Posts by Daniel Gregatto • 1,054 points
34 posts
-
5
votes1
answer663
viewsQ: Views do not recognize @model, @Viewbag, @Viewdata
I am using Mono 5.10.1 and Visual Studio Professional for Mac (Version 7.5.4 build 3) Views do not recognize tags like @model, @Viewbag and @Viewdata, either in older projects that were originally…
-
1
votes1
answer87
viewsQ: Rule Rewrite Changing script directories
I have the following problem, when using the Rule below my default directory is changed and mine js scripts and files css stop working. <rule name="Produtos Detalhe"> <match…
-
2
votes1
answer329
viewsQ: Facebook Graph API - How to post to a page?
Good afternoon. I need to know how to adapt the script below for me to post on the page that the logged in user is administrator. For example, if my user is a 3-page admin on the face, I want to…
facebook-graph-apiasked Daniel Gregatto 1,054 -
1
votes1
answer97
viewsQ: ENTITY FRAMEWORK - add-Migration New Project without renaming old tables
I want to share a database with some projects. I’ve already done the first project with the bank and it’s okay. I copied the project to create another similar one, changed the initial prefix of the…
-
2
votes1
answer162
viewsQ: Webmethod with Data Model
Good morning, I would like to receive a data model in a method of my webservice, what is the correct procedure for me to get ? I’m trying the code below but it’s not working. namespace UI.Web {…
-
2
votes3
answers517
viewsA: Create FTP access to a virtual directory on Azure
Finally, Azure does not allow you to create a user for a subfolder. It was necessary to create a resource in my application where the person could upload the project in . zip and the process…
-
1
votes2
answers46
viewsA: Select of dates
Try the following code: SELECT * FROM jmh_licenca l INNER JOIN jmh_servidor s on l.lic_ser_id = s.ser_id INNER JOIN jmh_doenca d ON l.doe_id = d.doe_id WHERE l.lic_data_inicial BETWEEN '2012-08-01'…
-
7
votes2
answers1872
viewsQ: Error: The name 'Viewbag' does not exist in the Current context
Good morning, I have projects using System.Web.MVC na versão 4.0.0.1, worked normally in the 2013 version of Visual Studio, now I’m trying to work with Visual Studio 2015 and my Views no longer…
-
4
votes2
answers1380
viewsQ: Capture Machine Identification with C#
Good morning, I have several computers with the same output IP, how can I get any information that leads me to know which computer a request came from? I use C# Asp . Net MVC
-
2
votes2
answers808
viewsA: Do not rotate iframe until clicking
The element display:none just hides the user view element, keeping it in the page load. You must remove the html iframe and load it through an onclick event via javascript when you click the button…
-
3
votes1
answer110
viewsA: Subscribe to a php Session
On the property page where you arrow the value of SESSION put in the line above: unset($_SESSION['corretor']); This will destroy the created session, but it is not necessary because whenever you…
-
6
votes1
answer1140
viewsQ: Secure Return - Solution
I use C# Asp.Net MVC, I had to make the return of data Secure Pag and I found very flawed the documentation, follows the solution I created below for those who go through the same difficulties.…
-
6
votes1
answer1140
viewsA: Secure Return - Solution
First set the return of data on the pay for your application page, in case this example would be www.site.com.br/Home/Return Domain of the Request using System; using System.Collections.Generic;…
-
1
votes4
answers2897
viewsA: Verifies which variable is with higher value returning the variable not the value
I believe you should control it this way: $array[0] = 2; $array[1] = 7; $array[2] = 3; $array[3] = 4; $array[4] = 5; foreach($array as $key => $value) { if ($value > $val_max) { $key_max =…
phpanswered Daniel Gregatto 1,054 -
2
votes3
answers517
viewsQ: Create FTP access to a virtual directory on Azure
I have a Web App on Azure and created an internal folder as a virtual directory for a third-party developer to deploy a contracted system. I’m having great difficulty creating an FTP that only has…
-
2
votes2
answers132
viewsA: Circle with text in the center Asp.net
Try the code below if you are not using Razor put in its format: .bloco{ background-color: #4fb7ad; font-size: 10px; color: white; padding: 10px; border-radius: 50%; text-align: center; display:…
-
8
votes2
answers1854
viewsQ: Pagination C# MVC Asp . NET
I have a problem with paging performance with Entity Framework and SQL SERVER, first it does getAll and then list the pagination var bdPergunta = new PerguntaRepositorioEF(contexto); var pergunta =…
-
3
votes3
answers1833
viewsQ: Delete Relate Record using Entity Framework
Good morning. I am working with Entity Framework and I have a problem updating a relational table. For example, I have a product with several categories, in the edition I remove the category x of…
-
2
votes1
answer105
viewsQ: Perform a redirect in Constructor
How can I make a Response.Redirect() in a class builder? public class FarmaciaController : Controller{ public FarmaciaController(){ if(!userLogin.usuarioTemPermissao("Farmacia"))…
-
2
votes3
answers183
viewsA: Insert values from table B in table A if they do not exist
Something like that: INSERT INTO tabelaA (column1, column2, someInt, someVarChar ) SELECT tabelaB.column1, tabelaB.column2, 8, 'some string etc.' FROM tabelaB WHERE (SELECT count(Id) FROM tabelaA as…
sqlanswered Daniel Gregatto 1,054 -
2
votes1
answer1070
viewsQ: Securityexception - Permission Error
Hello, I am climbing an application in my Locaweb hosting and I got stuck in this error, someone knows how to solve this permission problem ? [SecurityException: Request for the permission of type…
-
2
votes2
answers1232
viewsQ: Import Itaucripto DLL into VB
Hello, I’m implementing the second way of boleto Itaú, but I’m trying to work with ASP.NET VB and I don’t have much knowledge in this language. I did everything right and is working locally, but…
-
6
votes2
answers145
viewsA: Is it necessary to use metatags on administration pages?
I believe that in the administration part of the site the goals "Keywords" and "Description" can be ignored, but it is worth using the Meta Title so that the user himself used to be able to locate…
-
0
votes3
answers2125
viewsA: Override CSS Component Primefaces
To leave them side by side, you can use floats: style="width: 50% !important; float:left !important"
-
1
votes3
answers7043
viewsA: How to make a left Join using a Where condition?
Try the query below: SELECT c.id, c.nome, c.image, u.id AS follow, IF(u.id, 'Sim', 'Não') as segue FROM category c LEFT JOIN (user_follow_category u) ON (c.id = u.to) WHERE u.from = 74 Note that it…
-
3
votes1
answer162
viewsA: Query to sort by two Mysql dates
Try this SQL SELECT n.*, (IF (n.data_atualizacao > n.data_criacao, n.data_atualizacao , n.data_criacao)) as data_maior FROM tbl_noticias n ORDER BY data_maior DESC…
-
3
votes1
answer1057
viewsA: Problem saving result of an SQL query to a PHP variable
See if the code below works: I checked that you are not doing the SQL query and you are also browsing an array when you actually want to bring only 1 record. include('connectdb.php'); $cli =…
-
2
votes4
answers15217
viewsA: View PHP date and time
Try: <?php echo date('Y-m-d H:i:s') ?>
-
1
votes1
answer614
viewsQ: Switch HTACCESS to Web.config
Hello, It is possible to convert this HTACCESS code to a Web.config file ? RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)\?*$…
-
2
votes2
answers585
viewsA: Error When Receiving POST in Paysafecard
Rafael, I suggest you generate a new Token as it may cause problems in the application security. Also do not disclose your website address because the application does not check if it is CHECKED…
-
1
votes3
answers6367
viewsA: How to disable Developer Tools options in Chrome
There is no way to disable, just display a message on the console that gives the impression of being disabled. <script type="text/javascript"> Object.defineProperty(window, "console", { value:…
-
3
votes2
answers70
viewsA: Where is the mistake?
There is more than one error, the way it is whenever a record is not level 4 it will fall on Else. There is also an error in closing quotation marks on two lines (5 and 30) The correct code would…
-
1
votes3
answers70
viewsA: How to add two values?
If it is for him to see the same page as the user with level 1 use the code below: while($row = mysql_fetch_assoc($result)) { if($row['level'] == '**1**' || $row['level'] == '**2**' || $row['level']…
-
1
votes1
answer107
viewsQ: Error Login Asp.net MVC
I’m not able to validate my login, follow code below: public ActionResult Login(FormCollection collection) { AlunoAplicacao bdAluno; bdAluno = AlunoAplicacaoConstrutor.AlunoAplicacaoEF(); var Aluno…