Questions tagged as 'asp.net'

2
answers

ASP.NET MVC5 How can I create a CRUD for the AspNetUsers table

How can I create a CRUD for the AspNetUsers table, creating a MVC 5 controller with views using Entity Framework This is the structure of the table: AspNetUsers This is the Model: IdentityModels namespace Portal.Models { publi...
asked by 04.05.2016 / 02:03
1
answer

Can I use an Eval () in the ItemCommand of a ListView?

What I want to do is a button that edits me by SQL , and I have that, but I need the ID of the row to edit (I extract it from with Eval("id") of listview1 ). I have a ListView that within ItemTemplate there is a...
asked by 23.12.2018 / 04:23
1
answer

How to import excel data considering the first row that do not have a header in C #?

To be able to import data from excel I use the following code: Foldername = Server.MapPath("~/Importados/"); fileuploader.SaveAs(Foldername + filename.ToString()); String conStr = ""; switch (Extension) { case ".xls": //Excel 97-03...
asked by 01.08.2018 / 06:54
1
answer

No AJAX response in aspx

I have a method in the codeBehind of a webForm in which I redirect an AJAX query [WebMethod] public string buscarUser(string name, string pass) { SqlDataReader rd; string resp = "CASA; return resp; } AJAX $(document).on('...
asked by 17.08.2018 / 23:46
1
answer

Leave image by default ASP .NET

Good morning. You see, I'm doing a project that includes a profile, and that profile has the option of adding an image. The issue here is that it saves the path of the image in BD and the image in the folder. But when creating a new user, the Im...
asked by 18.05.2018 / 16:47
2
answers

How to validate a texbox that only lets me enter numbers up to 100

How can I validate a textbox so that it does not allow me to enter more than 100 in asp.net? Try doing that: <%= Html.TextBox("nota" + cont, item.nota, new { @class = "form-control", type = "number", min = "0", max = "100", id = "txtNot...
asked by 02.05.2018 / 15:35
1
answer

Decimals in mvc

How about. I am developing a web application in Mvc, and it is a medical calculator, where the user enters certain values, the account is made, and a value is returned. In the cases where the entry has to be with decimals, I get the following er...
asked by 22.12.2017 / 02:12
1
answer

Access files in VS - C #

Colleagues, I have the following problem: I need to access files of different types (images, pdfs) that are within the solution of my project. I tried to use Server.MapPath but it throws an exception, which mentions that HttpContext.Cu...
asked by 15.11.2017 / 16:36
1
answer

Perform popup ASP jQuery C #

I want to perform as an alert but with jQuery, that is, if something bad appears that shows the alert as a popup . That is to say at this moment it does the validation but with a alert of JavaScript I want it to be more friendly f...
asked by 27.03.2017 / 04:49
1
answer

Access a model from the controller of a ViewModel

I am using ASP.NET MVC4 and I find it difficult to bring data stored in the tables in the database. I understand that there are some clauses ToList() that could list the data, but currently the methods I use always return me null...
asked by 02.05.2017 / 17:42