Questions tagged as 'asp.net-mvc'

1
answer

Use of td and tr

What can I do to make the employee's name horizontal and not vertical as shown in the image Here is how I use it in td     
asked by 17.10.2018 / 17:05
2
answers

How to register users in ASP.NET MVC?

My code is this to register users: [HttpPost] [ValidateAntiForgeryToken] public ActionResult RegistrarUsuario([Bind(Include = "estado")] Usuarios usuarios) { if (!ModelState.IsValid) { return RedirectTo...
asked by 11.04.2018 / 20:52
2
answers

Pass htmlAttributes to EditorFor template

Good morning! I am working on templates for EditorFor for the different types of data, specifically int and double in order to generate them in text type, with a oninput that validates me not to enter incorrect informat...
asked by 27.04.2018 / 14:12
4
answers

Close Modal Popup

I have a modal popup that closes when I select an item in a table. Screenshot: The popup closes, but doing so leaves my template html blocked. Why is this happening? This is the code I use to close the popup: $(docu...
asked by 16.03.2017 / 15:07
3
answers

Rows of DataTable Bootstrap in a single line ASP.net MVC

I want all the rows to be in one line. As you can see below, I have a view where I get a dynamic datatable that was fed by a Json, I do not know the name of the rows or columns so I can not put a fixed width to all columns <table id="exa...
asked by 08.02.2017 / 20:11
1
answer

Save UserID of a user logged in a specific colmna of the Data Base

I need to save the ID of the user who has logged in the column named "CreatedBy", but I can not write the correct query. Each time a "FitnessGoal" entity is created , the identity data plus the User ID will be saved in the DB: [HttpPost]...
asked by 17.08.2018 / 22:13
3
answers

How to download A pdf file in MVC 5 directly

I wish that when carrying out certain operations the file generated in pdf is downloaded directly and not displayed in the browser (chrome) byte[] fileBytes = System.IO.File.ReadAllBytes(@"\svr\dllo\Pendientes\" + nombrePDF); return Fi...
asked by 12.12.2016 / 15:16
2
answers

How can I refresh a form made with ajax so that the inputs are clean?

I have a form made with ajax using Ajax.BeginForm this I have it in a modal, the problem that I have is that when I send the form I make the modal one close with jQuery but if I open the modal the values of the inputs that I had pr...
asked by 22.06.2018 / 16:42
1
answer

Why does not the data annotation StringLength [] and MaxValuie [] work for me?

I am having problems to implement the asp.net mvc 5 annotations. When designing my model, I put the [StringLength] annotation to validate that the user enters a minimum and maximum number of digits. It works well, but at the moment of mak...
asked by 28.05.2018 / 18:07
1
answer

Get hostname from MVC

I have a form that every time a record is inserted or modified it adds the hostname in an SQL field, the detail that when I pass the system to the server where it would be hosted, it puts me the hostname of the server. Could I somehow get the ho...
asked by 19.05.2018 / 01:13