Posts by f.fujihara • 316 points
10 posts
-
0
votes1
answer188
viewsQ: Visual Studio keeps giving error in the ASP.NET MVC 5 project
Hello, I’m trying to open an ASP.NET MVC 5 project and is giving the following error: Can someone help me? I already installed the updates and MVC 5. I installed the web pages through Nuget:…
-
0
votes5
answers29209
viewsA: Reset to input fields after Ubmit with Jquery
Use the following: var elements = document.getElementsByTagName("input"); for (var i=0; i < elements.length; i++) { if (elements[i].type == "text") { elements[i].value = ""; } }…
-
6
votes2
answers5466
viewsA: How to duplicate the records of a table in the BD
Friend makes an Insert and in Voce values makes a select, thus: INSERT INTO [Database].[dbo].[Table] ([Coluna1] ,[Coluna2]) select Coluna1, Coluna2 from Table GO This will duplicate your table as it…
-
3
votes2
answers1365
viewsA: ASP NET MVC5 - How to enable and disable HTML elements
And if Voce used Viewbag? Use that on the controller: ViewBag.ClienteSP = VerificaClienteSP(); In cshtml: if(@ViewBag.ClienteSP) { //habilita ou desabilita os componentes }…
-
0
votes2
answers1450
viewsA: Send Model Razor with $Ajax Serialized Controller
Have you tried that? @using (Ajax.BeginForm("AdiconarTeste", "Empresa", new AjaxOptions { OnSuccess = "Salvar()", OnComplete = "unlockPage()", OnBegin = "lockPage()", OnFailure = "ajaxHandleError"…
-
4
votes5
answers14658
viewsA: How to validate date taking into account leap year?
Hey, try this here: function leapYear(year){ return ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0); }
-
1
votes2
answers1137
viewsA: Standards for user authorization/permission
That depends on the technology you’re using. If you are using MVC, I would recommend that you customize a class and specify roles, for example the Authorizeattribute(System.Web.Mvc). This link…
-
0
votes2
answers2118
viewsA: How do I set a Radiobutton to default?
There is a property in the component itself: Cheked(true or false) private void radioButton2_CheckedChanged(object sender, EventArgs e) { comboBox4.Visible = false; comboBox5.Visible = false;…
-
0
votes3
answers388
viewsA: Date reassembly with javascript
I found a bibliography of js on the internet the other day that helped me a lot with problems related to date in Javascript. Follow the link to download the library: DATE JS…
-
1
votes1
answer267
viewsA: Generating fields by ASP.NET code
TextBox txt = new TextBox(); txt.ID = "textBox1"; txt.Text = "helloo"; form1.Controls.Add(txt);