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
-
1
votes1
answer37
viewsHow to choose (depending on login) which master page to run?
I wanted something like this (it doesn’t work). "The Masterpagefile property can only be set in or before the 'Page_preinit' event'." foreach (DataRow item in dt.Rows) { if…
-
1
votes1
answer110
viewsSystem.Data.Entity.Infrastructure.Dbupdateconcurrencyexception error while updating with Entity
Good morning. I need to do an update via Entity and it accuses me of the following error: System.Data.Entity.Infrastructure.DbUpdateConcurrencyException: 'Store update, insert, or delete statement…
-
1
votes1
answer674
viewsASP.NET MVC Pagedlistpager pagination with more than one parameter
I have the following page using x.Pagedlist @using AspNet.Models; @using X.PagedList.Mvc @{ ViewBag.Title = "Visualiza"; @model X.PagedList.IPagedList<AspNet.Models.Pessoa> } <h2>Pessoas…
-
1
votes2
answers121
viewsProblems with values passed to Static variables with class on the server
Good morning, everyone. I am currently suffering from a problem and cannot find the solution. I have a login system in ASP.NET C# when I do the authentication everything happens correctly only that…
-
1
votes0
answers54
views"Could not parse Expression '...: The Given Arguments Did not match the expected Arguments"
I am using the Compiledqueries Feature of the framewok core 2.0 Entity but Even though it does not Give syntax error, when the program is running, I get this Exception: Could not parse Expression…
c# asp.net asp.net-core entity-framework-core .net-coreasked 6 years ago Samuel Silva De Carvalho 11 -
1
votes0
answers506
viewsPrompt + EXE Server IIS execution by WEB page
I am running a command of an executable by the CMD of the Blue Prism software, I tested local and it worked, but I have a question for when I go up in production, because the IIS server will have…
-
1
votes1
answer173
viewsASP.NET MVC after upgrading the packages the default template is lost?
I’m new in this area, I’m "walking barefoot on rocks" to learn ASP.NET, I use VISUAL STUDIO 2017 Community 2017 Version 15.8.4. When creating a new ASP.NET MVC project the visual studio generates an…
-
1
votes1
answer1719
viewsInconsistent accessibility: "value" parameter type is less accessible than "value" method
Inconsistent accessibility: "Iclientmanager" parameter type is less accessible than "Clientecontroller.Clientcontroller(Iclientmanager, Usermanager) Controller: public class ClientController :…
-
1
votes1
answer199
viewsSubmit the form within a modal view redirects me to the view page
I have an MVC project. A View Home/Index charges the View Usuarios/Create in the form of a bootstrap modal. However, my <input type="submit" /> redirects me to the view address…
-
1
votes0
answers25
viewsAsp Net Updatepanel
I am studying Aspnet and I can not use Updatepanel in any way, I have a webform in a nested masterpage this is the code: <%@ Page Title="Home Page" Language="C#"…
asp.netasked 5 years, 11 months ago jorge rafael 13 -
1
votes1
answer38
viewsCheckbox field is not recognized marked
I have these two fields checkbox <label class="control-label col-md-3" style="text-align:left;">Tipo de Pedido</label> <div class="col-sm-3" style="text-align:left;"> <input…
-
1
votes1
answer86
views"Jsonresult" does not contain a constructor that accepts 0 arguments
I am trying to return a Jsonresult to my View, but it is returning the following error. "Jsonresult" does not contain a constructor that accepts 0 arguments You could help me friends ? [HttpGet]…
-
1
votes1
answer70
viewsHow to pass a parameter together with the Model to a Partialview when rendering it
To create some fields dynamically, I’m using a render and render. When calling Partial _Contact, I would like to pass the [i] value of the for index to sort the fields. It is not working... You’re…
-
1
votes1
answer85
viewsHelp with Querie in Linq C#
I have a message table in the following scheme: Id | osID |Interessado | Remetente | Destinatario | Msg -------------------------------------------------- 1 | 2 |João | João | Maria |bla bla bla...…
-
1
votes1
answer645
viewsCreate Dropdownlist with Viewbag
I’m getting the following error: Invalidoperationexception: There is no Viewdata item of type 'Ienumerable' that has the key 'Office'. Here I search from the database: public…
-
1
votes0
answers100
viewsUse 2 models in a View, but separate them in the form submission
I’m getting the following error: 'Addemployeeviewmodel' does not contain a Definition for 'Officeemployee' and no Extension method 'Officeemployee' Accepting a first argument of type…
c# asp.net asp.net-mvc-5 asp.net-core entity-framework-coreasked 5 years, 11 months ago Matheus 616 -
1
votes1
answer211
viewsHow to work with Foreign Keys in C# ASP . NET Core?
Good night, you guys. I am a beginner in C# ASP . NET Core and I am facing problems with Foreign Key. I need to popular a combobox with data from a database table. Next is my Seller model using…
-
1
votes1
answer61
viewsencoding formatting . net
all right? With a problem that is as follows: I recover the html of a legacy system and, I need to change this html pa then return to the browser with the new html. But when I recover this report…
-
1
votes1
answer106
viewsForeach or for inside an Anynimous Type C#
I am mounting a return of an Api on JSON, And the comeback I ride in Anynimoustype I believe that’s what it’s called, in it I name the variables as they go to Json, but I needed to make a foreach to…
-
1
votes1
answer198
viewsHow to disable ZIP Mask to save only Typed numbers when performing a Post - Asp.net MVC
I’m using a Remark component that has a data-plugin="formatter" where it applies a CEP mask to field. The field has a size of 8 characters, but the mask has 9 because of the "-" (Ex: 29780-000).…
-
1
votes2
answers43
viewsverify that Radiobutton with Repeatdirection, generated in Datagrid are checked
I have a Radionbutton with Repeatdirection which is generated on my Datagrid, yes and no button. <asp:TemplateColumn HeaderText ="Reevio" ItemStyle-Wrap="false" ItemStyle-Font-Size="8"…
-
1
votes0
answers112
viewsHow to use more than 1 'div Asp-validation-Summary' in the same Razor view?
I have a Razor view that has two different forms, one of Login and the other of User Registration, I built both forms and I inserted as usual the tag with asp-validation-summary <div…
-
1
votes1
answer504
viewsASP NET MVC - "CORS" ERROR
Hello, I have a mistake and I can’t fix it. I have an ASP NET-MVC5 application and I carry a frame in my view that has some fonts, but they are giving the following error: Access to font at…
-
1
votes0
answers44
viewsHow to change the System.Web.UI.Webcontrols (Treenode) dynamic "Id" in c#
I’m new to the subject, and I’m creating a dynamic structure of treenodes, in this structure the id of the nodes, is automatically implementing, but I’d like to define the id of the nodes, so it…
-
1
votes0
answers46
viewsHow to fill a property (type Object) from a form
I have the following code @model ModelTransaction <div class="form-group"> <label for="name">Conta:</label> <select asp-for="Account" class="form-control"> @{ foreach…
-
1
votes2
answers130
viewsProblems loading cascaded dropdownlist whose field is created dynamically - Asp.net MVC
I’m having trouble loading a DROPDOWNLIST that is dynamically created. When selecting a CONTACT FORM, I need the dropdownlist CONTACT TYPE to be loaded with the related options. The problem is that…
-
1
votes1
answer50
viewsHow to pass a decimal type variable to a string type sql command with decimal separator "."?
I have the following Model class: public class ModelTransaction { public int Id { get; set; } [Required(ErrorMessage = "Informe a data")] public string Date { get; set; } [Required(ErrorMessage =…
-
1
votes2
answers517
viewsPass parameters through the url
I’m trying to pass a parameter of my view to my controller by the url and I’m not getting it, as you can see in the code below I’m using viewbag, I don’t know if it’s an error on the route or…
-
1
votes0
answers37
viewsSend multiple checkbox via model to Controller
I have a class: public class TreeViewConfigVm { public string plant_selected { get; set; } public List<SelectListItem> criticality { get; set; } public List<SelectListItem>…
-
1
votes1
answer33
viewsWhy access to a Session within an Actionfilter is behaving this way
Greeting to all. I am developing an application in Asp.NET MVC5 and found a following problem: The application needs me to log in from any screen it accesses via browser. To decrease the amount of…
-
1
votes0
answers216
viewsHow to send PDF to Webservice - Asp . NET
I am having trouble sending a PDF to a Web Service. In case, the documentation is this way: then I made the following code: private async void EnviarDocumentoWhats(string pdf) { using (var client =…
-
1
votes1
answer141
viewsReturn json from query Inner Join ASP.NET WEB app C#
Good afternoon, you guys. I’m trying to return the result of a query with INNER JOIN in a C# REST API but I’m not getting it,I can’t use frameworks, it has to be at the base of the code, I’ve…
-
1
votes0
answers468
viewsMaximum request size exceeded Httpexception (0x80004005)
I am trying to upload files on my system however I cannot due to error message: Httpexception (0x80004005): Maximum request size exceeded. I’ve tried several solutions and nothing Following the code…
-
1
votes1
answer260
viewsHow to call a class method in webforms code-Behind?
It is possible to call a class method in the webforms code-Behind? Default.aspx: <div class="row" style="margin: 50px"> <div class="col-md-6"> <asp:TextBox ID="txtElemento"…
-
1
votes1
answer259
viewsProblems with closing and opening Modals Bootstrap - Asp.net MVC windows
I created two types of modal windows to dynamically open Partialviews: modalGenerica (open large windows) and modalGenericaPequena (open small windows). When I open the two overlapping windows…
-
1
votes0
answers47
viewsAjax rejecting images in byte array
I have a system made in Asp.Net, I use as a request source Ajax along with Jquery. I created a function that searches the images stored in the database, converts them to byte array (this via…
-
1
votes1
answer243
viewsProblems passing 3 parameters via AJAX request -Asp.net Core MVC
I need to pass 3 parameters to my controller, but the values are not enough: Personal Contact Personal Modelcontact Contact Information: Complex parameter (class with properties); int…
-
1
votes0
answers119
viewsCheck if any user has logged in, and pick up the logged in user - core 2.1
Hello I need to check if there is any user authentication, and after checking if any user has authenticated to get this user’s ID. I own a Middleware that redirects the user to condominium…
-
1
votes1
answer272
viewsCheck if the user has authenticated, and get authenticated user information
I want to check if you had any user authentication, and after checking if any user authenticated to get that user’s ID. I have a Middleware that will redirect the user to condominium registration…
-
1
votes1
answer78
viewsInsert new fields dynamically, one next to the other
Hello, I need to clear up the following question. I have a web application, made in Asp.Net, in a new functionality I have 6 fixed fields containing a combo, a space for viewing the photo and an…
-
1
votes0
answers48
viewsUpload file to Asp.net core by fetch
I’m editing the previous question. This function traverses a table with input file and plays in a formData but sent by fetch at the asp.net core is coming null function uploadFiles() { let…
-
1
votes1
answer172
viewsConsume the Security of an API for MVC Web Application
I have an API to log (Aspnet Identity) into the WEB MVC application. Access to WEB MVC application(Login Screen). I call the API by passing email and password, which was informed in the WEB MVC…
-
1
votes2
answers90
viewsHow can I Create a column in SQL SERVER where, depending on the value, debt or credit appears?
Good friends, I made a program where I import data from an excel file in the sql database, this database is about values, and etc... And wanted to know if you have how to create a column where after…
-
1
votes2
answers2655
viewsBeginner : C# recursive function
help for Recursive Function that prints the average of the elements of an integer list and the number of elements larger than the average. in c# good, what I have so far, is giving…
-
1
votes1
answer46
viewsWhat do you call the cast() function of the database in the ORDER method of a database in a LINQ expression in C# C#?
I have a field that stores DATETIME in my database. However I need to ignore the time of this field when I am ordering for it. The following code makes my search: public virtual async…
asp.net entity-framework linq linq-to-entities asp-net-coreasked 5 years, 4 months ago Daniel Silva 11 -
1
votes3
answers210
viewsclear field if only html tags exist in text field
I have a text field that allows html codes. When the field is empty the tags are passed <p><br></p> below the screens, if I give several enter in the field below the cloths is…
-
1
votes2
answers33
viewsHiddenfield value always zero
Good morning, I am learning Asp.net and I came across a problem in my code that I do not know how to solve. I have a gridview that is fed by the database and I have a button that calls the…
-
1
votes3
answers132
viewsChoose Modal from variable
I am giving the value to a variable string in my index.Cs file and then I am taking the value to use in Typescript, however I am creating another page besides index now and is giving error when I…
-
1
votes1
answer164
viewsInjection error of dependency
I’m using Xunit to carry out my tests, I am trying to access my CampeonatosController, consequently I have to pass the value shown in the image below as parameter, but I am getting the error below.…
-
1
votes0
answers72
viewsInserting data into two tables in a single form
Hello, good morning, good morning! I am studying Webform in college, and I have a question to enter a value of a single form page for two Tables. In case to exemplify, I have two tables "Person" and…