Questions tagged as 'asp.net'

1
answer

Execute log method every time ASP.NET MVC (Exception Handling)

I need to implement Error Logging in my ASP.NET MVC application, , My question is as follows, is there any way I can trigger a method (would this be a method that would write the error log, e-mail, and the like exception handling) whenever an E...
asked by 15.01.2017 / 19:14
2
answers

Entity Framework - tables were not created

I'm following an Entity Framework workbook, I created the classes: public class k19Context : DbContext { public k19Context() : base("k19Context") { } public DbSet<Turma> Turmas { get; set; }...
asked by 14.01.2017 / 12:14
1
answer

Javascript set value of one field in others

I have the following code below <script type="text/javascript"> function getValue() { var x = document.getElementById("NuJaneiro"); document.getElementById("NuFevereiro").value = x.value; } </script> <td...
asked by 17.12.2015 / 18:35
1
answer

Source not recognized in PDF generation

I'm using the ITextSharp library to create PDF's and I'm having problems with the source of the document, I have the error "Font is an ambiguous", I've looked in several places and all the examples end up giving the same error, fix this or do yo...
asked by 11.06.2016 / 20:47
1
answer

Html.BeginForm () Do not submit model, ModelState.IsValid = False

Next I'm with the Html.BeginForm () where the same submits the model but when it goes to the same control it finds the ModelState.IsValid false. Follows Template, Control and BeginForm Model: [Table("TB_Estado")] public class Estado { [Key...
asked by 09.12.2015 / 20:59
1
answer

Validate form data with registration in the database

I am developing with ASP.NET MVC (I use ENTITIES / DAL / LOGIC - layers) and wanted to know better way to validate data form (website) form to be registered in the database? I have in the DAL layer (access to DB - SQL) this code: public void...
asked by 24.05.2016 / 11:50
1
answer

How to update only the model in ASP.NET MVC?

I'm using ASP.NET MVC 5 and EF6 in a project, and I have a class that does a query on the post office website and returns me the address from the zip code. Until then, all right, what I would like to do is to use onblur for as soon as I register...
asked by 02.10.2015 / 19:23
1
answer

How do I remove the character limit of a URL by GET or POST

I'm having an error submitting the form, it returns a MaxQueryString error. Is there any way to increase this number / remove this limitation? because \ web.config \ is already set high and is not advancing.     
asked by 09.12.2014 / 14:51
2
answers

Write input button in ASP.NET C #

I have the following code: r.Write("<th colspan='3' style='text-align:center'><input id='btEmail_" + (n - 1) + "' name='btEmail_" + (n - 1) + "' runat='server' class='btn bg-brownCinc' onclick='btEmail_' type='button' value='Update' /...
asked by 19.06.2015 / 12:39
1
answer

Get HeaderText from a column in a GridView

When I go through the event RowDataBound of a GridView , I want to get the value of headertext of the column but I can not. An example I want to get: if (e.Row.RowType.ToString().Equals("Header")) { } else if...
asked by 03.06.2014 / 13:50