Posts by FernandoNomellini • 658 points
19 posts
-
3
votes2
answers957
viewsA: C# - How to make a lambda filter with more than one field?
2003 cars down with value greater than 5000: var lista = Fiat.Where(c => c.Ano <= 2003 & c.Valor > 5000);
-
1
votes1
answer1927
viewsA: Display the return of a query with 2 tables in the same View in ASP.NET MVC
In your result action, Voce can instantiate a CLTB_CATEGORIA, popular the two properties and send it to the View. Use normally: Your Controller var modelo = new TB_CATEGORIAS(); modelo.TB_CATEGORIAS…
-
1
votes1
answer836
viewsQ: Reload an Angularjs table from time to time
My Angularjs page displays a table with data coming from a JSON. What I want is that the table is updated from time to time, because the data is updated according to the second and I show only the…
angularjsasked FernandoNomellini 658 -
1
votes1
answer385
viewsA: Class derived from Printdocument class C#
Seems to me you’re using the wrong builder. Your button code. Print printDoc = new CPrint(); rintDialog dlgPrint = new PrintDialog(); lgPrint.Document = printDoc; f (dlgPrint.ShowDialog() ==…
-
0
votes1
answer59
viewsA: Problems with connection to the database
host: localhost Indicates that the SQL server is on the same server as your site. So, if you are running a local test on your machine, you will not find the server. Ensure that code is running on…
-
2
votes3
answers185
viewsA: Ifs and Object Orientation - C#
In this case use a Factory. A class with a static method that returns a Yexecutor. Maybe it’s something like public static IExecutor GetBestExecutor(Condicao _condicao) { switch(_condicao) { case…
-
3
votes2
answers573
viewsA: Query in a column with different values
Your command never will return two different names because you are searching only ONE name, and the name you are searching comes from a variable called tabela. Your command should be: where (…
-
-2
votes3
answers198
viewsA: How to humanize javascript dates
It is not as simple as it seems to be. I have example in php.... Who knows you can not transpose the idea to javascript.... function dateDiff($dia1) { // This is a simple script to calculate the…
-
0
votes2
answers1140
viewsA: Protect ASP.NET source code (aspx)
Is your source code in a separate file . Cs (Code Behind) or is it embedded in Aspx ? In any case, as already mentioned, Visualstudio generates a DLL per page . aspx, carrying its source code is…
-
2
votes8
answers2805
viewsA: How to know which is the last element on a list?
List<string> campos = new List<string>(); campos.Add("id"); campos.Add("descricao"); campos.Add("Titulo"); string sql = "INSERT INTO teste( "; foreach (string campo in campos) sql +=…
-
3
votes3
answers2776
viewsA: Send POST Textarea one value per line
Textarea already breaks the text with " n"; <? $linhas = split("\n", $txtBox); foreach($linhas as $linha) { echo $linha . " <br> "; } ?> <form action="" method="get"> <p>…
-
0
votes2
answers1183
viewsA: My layout does not render
Next: In the Preview Window at the top there is a line with several icons, the last icon is the android doll with the title : "Android Version to use when Rendering layouts..." switch from 22 to 21…
-
13
votes1
answer15160
viewsA: A potentially dangerous value Request.Form has been detected in the client
Decorate your method with the attribute ValidateInput [HttpPost] [ValidateInput(false)] public ActionResult index() { return view(); } Maybe you need this on your Web.Config <httpRuntime…
-
2
votes2
answers2084
viewsA: Write input button in ASP.NET c#
Onclick event of the button element is Clientevent, IE, will look for a Javascript function What you need is to invoke the server method, fortunately this can be done easily using the Onserverclick…
-
0
votes2
answers3616
viewsA: How to save the logged in user ID
Have you tried using the FormsAuthentication.SetAuthCookie(UserName, false); ? So you can use it later anywhere User.Identity.IsAuthenticated to find out if you are logged in, and User.Identity.Name…
-
1
votes2
answers460
viewsA: Problems with Selectedindexchanged Asp.net C#
What is the initial data of the combo ? is already the All ? How about using a ddlSalas.Items.Insert(-1, new Listitem("Select", "")); before ddlSalas.Items.Insert(0, new Listitem("ALL", "")); ? Will…
-
1
votes5
answers580
viewsA: Doubt in SQL query "between" or "in"
Comparing dates is easy if you flip month/year to year/month into a single integer value: In your example, 06/2014 to 05/2015 you would compare whether the date is between 201406 and 201505. where…
-
1
votes1
answer1588
viewsA: Calling Asp.net application via HTML page
Format your URL to pass the fields at source: < form method="post" action="http:/ / servidor/aplicativo/Pagina.aspx"> <TABLE width="100%" bordercolorlight="#000000" border="1">…
-
5
votes1
answer103
viewsA: You doubt Asp.Net MVC
ASP.NET MVC has a very different concept than you are used to with webforms. There is no page concept .aspx, that is, a URL no longer refers to a particular file on the site. When you create your…