Most voted "asp.net" questions
ASP.NET is a web application framework developed by Microsoft to allow programmers to build dynamic websites and web applications. Use the tag for traditional web forms, the classic template that provides the illusion of "stateful" pages. Do not use this tag for the style using the standard Model-View-Controller; use [Asp.net-mvc].
Learn more…1,881 questions
Sort by count of
-
3
votes2
answers404
viewsPublication of ASP.NET MVC Project
Good morning gentlemen, I work in systems development, but until then I never had to publish on the internet an application of mine, because I have always worked with projects ready, what is the…
-
3
votes1
answer535
views -
3
votes2
answers603
viewsASP Classic runs on ASP.NET server?
I have a site all made in ASP Classic and hosted in a provider. My client - who is a multinational - wants to put their website inside the company’s global server and the guideline that came out…
-
3
votes2
answers89
viewsTransforming bank information into Link
I’m making a site with a string from the database but I want this string to be informed as follows, in place of it will appear a button that the user will click and this button will open the url…
-
3
votes2
answers95
viewsLabel in loop on Foreach
I’m having difficulty showing information that comes from an object to display on a Label, returning in list form. //Pegando os dados do Rest e armazenando na variável usuários var usuario =…
-
3
votes2
answers1037
viewsHow to close connection to Firebird database
I am doing a project in Asp.net c# web Forms framework 4.5 and I did a test connection to a Firebird database, but when closing the connection it is not closing, I used the following code to open…
-
3
votes1
answer865
viewsRecovering Findcontrol from Parent Peater in Child Remaster event
I’m having a hard time getting a field of my parent Peater at the click of my linkbutton inside another Peater (son). My Parent contains the report code and other information and my Parent contains…
-
3
votes1
answer77
viewsEntity Framework - Data Access Tips
I am working on a project using EF6 with C#, in one of my classes I have to save a file, example below: public partial class Arquivo { [Key] public int ArquivoID { get; set; } public string Nome {…
-
3
votes1
answer499
viewsAjax call webmethod with friendly URL
I don’t know if it’s a frequent question, or something that’s not possible. During my studies I realized that it was possible to do this with PHP, but I didn’t see anything with ASP.NET Web Forms. I…
-
3
votes1
answer512
viewsError: Cannot convert Implicitly
I’m getting the following error. It is not possible to implicitly convert "System.Linch.Iqueryable" to "Testemercos.Models.Applicationproduct". There is an explicit conversion ? in that part of the…
-
3
votes3
answers1650
viewsSend All Checkbox via Post
I’m trying to send all my View Checkbox, however, I can send only those selected via Formcollection Controller public ActionResult Index() { List<ListaCheckBox> listacheck = new…
-
3
votes1
answer1299
viewsHow to include a column that dynamically demonstrates image in a Gridview
I am generating a report and exporting to Excel, but as most reports the number of columns is dynamic and I am mounting the gridview dynamically. I need to demonstrate a column that displays images…
-
3
votes2
answers1392
viewsViacep does not fill in user address data (Website on the .NET platform)
I’m developing a web application on the platform. NET and I thought of making the user type the zip code of his address and automatically he would fill the text boxes with data of street,…
-
3
votes1
answer55
viewsValidate form data with registration in the database
I am developing with ASP.NET MVC (using ENTITIES/DAL/LOGIC - layers) and I wanted to know better how to validate data form (of the website)to be registered in the database? I have in the DAL layer…
-
3
votes2
answers167
viewsView with Ienumerable and Entityframework
I own a Sales entity and it has several fields (Iditem, Datavenda, Valorvenda, Taxadesconto, Idcliente, Idcategorito and etc). I already have all Views working for this entity(CRUD). Now I will…
-
3
votes1
answer203
viewsCompetition Server ASP.NET
I have a Silverlight application, which accesses a service in WCF. In this application I have a method Salvarnotafiscal(). This method calls a method Validarnotafiscal that verifies if there is…
-
3
votes1
answer973
viewsError to leave application authenticated by Windows
I’m trying to leave an application authenticated by Windows. But when I change the settings on IIS with anonymous authentication disabled as per the image below: I have the following mistake:…
-
3
votes1
answer475
viewsUsing dependency injection outside a controller with ninject
I have following code: public class ContaController : ApiController { private readonly IAppServiceUsuario _app; public ContaController(IAppServiceUsuario _app) { this._app = _app; } } how to inject…
-
3
votes0
answers730
viewsHttpwebrequest - Recover Nfe
I’m accessing the link of the Farm site ( http://www.nfe.fazenda.gov.br/portal/consulta.aspx?tipoConsulta=completa&tipoConteudo=XbSeqxE8pl8%3d) with the aim of returning the filled Nfe. When I…
-
3
votes1
answer198
viewsAuthorizeattribute in Controlller and Actions
When using an attribute (Authorizeattribute) developed by me (with use of Enums) it is not working as it should as follows: When used to memorize the Controller statement:…
-
3
votes1
answer459
viewsRun log method whenever Exception ASP.NET MVC (Exception Handling) occurs
I need to implement Error Log in my application ASP.NET MVC, My question is the following, is there any way I could trigger a method (This would be a method that would save the error log, send the…
-
3
votes2
answers96
viewsEntity Framework - tables not created
I am following an Entity Framework booklet, created the classes: public class k19Context : DbContext { public k19Context() : base("k19Context") { } public DbSet<Turma> Turmas { get; set; }…
-
3
votes2
answers1367
viewsConversion failed to convert varchar 'No' value to tinyint data type
I am trying to solve a patch error of converting a variable created by me to store data that is in an Excel sheet. The error happens when I try to insert the data that is in this variable in SQL…
-
3
votes2
answers446
viewsRestrict access to only one page in the application, leaving the rest free
I would like to restrict access by requesting login to only one page in my application. In webconfig I put so, but obviously this way requires authentication on all pages of the application.…
-
3
votes3
answers952
viewsSave date in Brazilian format in Postgresql
I have a Postgresql database on the Windows Azure server that is set to the Brazilian standard. If I do an SQL and run directly in Pgadminiii there from the server and run, the date is saved in…
-
3
votes1
answer691
viewsASP.NET Webforms, MVC or Webapi?
First I would like to point out that my knowledge in web development is very small, so my question will be directed on what to use and not how to use, because the goal is to study first and then…
-
3
votes1
answer3224
viewsInput string was not in a correct format
When calling the method below comes the message the input character string was not in a correct format private void SubmitData() { try { string user = usuario.Text; string pass = senha.Text;…
-
3
votes4
answers1252
viewsWhat are ASAX extensions for?
Finally, I started working with C#. I am working on a SITE project and I am using Visual Studio. I came across a file where apparently you should put the global settings there, which is the…
-
3
votes2
answers626
viewsExecute a condition (if/Else) that is inside a string in c# 4.5
I own a class that generates files csv from a query, and that file may have several templates, some with conditions to display value x or y. These conditions are within a database and when I recover…
-
3
votes1
answer58
viewsShow fields of an entity in a different View
I have an entity Academic who owns a Professor, I want in the View details of Academic the teacher responsible for it, i.e. Professor that belongs to that Academic. The code I’m already using is…
-
3
votes2
answers979
viewsHow to get value from a database column using C#
I have a web application that uses these 3 tables: Client: CREATE TABLE CLIENTE( ID_CLIENTE INT PRIMARY KEY, CLIENTE VARCHAR(50), ENDERECO VARCHAR(50), CIDADE VARCHAR(30), CEP VARCHAR(9), UF CHAR(2)…
-
3
votes1
answer1644
viewsEntity Framework Core 2.0 - Add-Migration does not work
I am creating a new code-first project. When trying to create Migration, using the command [Add-Migration Initial -Context LogAuditoriaContext] it simply does nothing, creates nothing, makes no…
c# asp.net asp.net-core migrations entity-framework-coreasked 6 years, 9 months ago LeoFelipe 1,455 -
3
votes2
answers83
viewsASP.NET MVC 5, I can’t bring set when I edit
I have a class of service and in it I have the User responsible for the service, which is a user of the IdentityUser. Remembering that I changed the Identity id from string to "Int", that’s all. I…
-
3
votes1
answer69
viewsInjection of Dependencies Layers Application / Domain / Repository
In an application using the concepts of DDD I am in doubt about who could inject (dependencies) in a certain class, if there is any standard for such. This is the following between the Application,…
asp.net software-architecture ddd dependency-injection solidasked 6 years, 4 months ago LeoFelipe 1,455 -
3
votes1
answer196
viewsHow to configure IIS for its proper functioning?
When I run my API by Visual Studio CTRL+F5 or F5 and open my application that consumes this API it works perfectly (Both on the same network or through NAT port forwarding). However when I publish,…
-
3
votes3
answers666
viewsASP.NET - How to use multiple post methods in the same controller?
I have the following problem: On a given HTML page I have two buttons that call different POST methods in the same controller. @using (Html.BeginForm("UserInfo1", "UserInfo", FormMethod.Post)) {…
-
3
votes0
answers99
viewsHow do I use the Visual Studio Authentication feature for an ASP.NET MVC project?
Gentlemen, I need an orientation to begin an ASP.NET MVC development project at Visual Studio. It relates to the implementation of the Authentication feature when creating a new ASP.NET project. My…
-
3
votes1
answer249
viewsError return method "public async Task<string>"
When I run the code below, it gives error on this line: Literal1.Text= ObterEmocoes(imageFilePath); Is giving this error message: An object reference is required for the non-static "Program.Get…
-
3
votes1
answer555
viewsASP.NET Core Pagination - Pagedlist.Core
I am creating an ASP.NET core study project, and when using the paging library PagedList.Core, the following error is occurring while running the command dotnet run: Startup.Cs(49,35): error CS0246:…
-
3
votes1
answer199
viewsHow do I make my form work with reCAPTCHA?
I am saving the data by Ajax, however my reCaptcha is not working properly, the form is sent even without pressing inside the Captcha. My Controller [HttpPost] [CaptchaValidator(PrivateKey=…
-
3
votes1
answer182
viewsIndividual and Legal in the same table
Could you help me please ? I am developing a crud for client, where I will leave physical and legal person in the same table, but in case when the user chooses the type of person through a radio…
-
3
votes1
answer241
viewsAccessing a list/array in a JSON URL
I am sending via JSON an array of strings, how can I access this array via url? example of some of the tests: http://localhost:51746/api/Language/Getlanguagelist? key=[spool,error]…
-
3
votes1
answer50
viewsError adding Controler to ASP.NET MVC
A doubt when creating a controller. Because when trying to create it has shown the error of the attached image. I created 3 small classes: Dependentes, Tipobenef, TitularPlano and ProvaContext…
-
3
votes1
answer469
viewsHow can I "pick up" values from one or more INPUT after clicking on a SUBMIT button in ASP . NET C#
I’ve been having the following problem: I have a registration form in which the customer must enter his data through the Inputs, at the end there is a button of type Submit, and when clicking it…
-
3
votes1
answer302
viewsC# and Entity Framework with Foreignkey between classes
People in my projects .Net MVC use the structure below. My projects, are with Entity Framework. The briefcase Entidades, are the classes I use in DbContext. Detailing the problem I have the class…
-
3
votes2
answers319
viewsHow to scroll through an enumerable list and check if the property repeats in the list during foreach turns
I have a list (IEnumerable) called People that contains the properties Id, Datanasc, etc... I need to bring this data to a listview in the html using the Razor (or it can be outside the cshtml page,…
-
3
votes1
answer176
viewsAPI with JWT authentication
Hello, I am building an API for studies and I am implementing JWT in the authentication of it. All the contents I found refer to Asp.Net Core, as I do for validate tokens in the. Net Framework? I…
-
3
votes2
answers333
viewsOpen page in modal form
I’m doing a crud and would like to open another page in modal form, but do not know how to do this, I even found on a site explaining how to do with javascript but when clicking the button nothing…
-
3
votes2
answers145
viewscheckar checkbox of gridview based on database value
My application needs to release types of accesses, for example, we have 5 branches and such person needs to access content from only 3 branches. The ADM user, can create or edit new users. When…
-
3
votes0
answers59
viewsASP.NETX conditional onkeydown event
I have an ASP form with 2 Divs with some fields to fill in, but there is a flag in the user’s profile that can or cannot hide one of them protected void Page_Load(object sender, EventArgs e) {…