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
answer94
viewsString in expression Entity C#
I need to make a dynamic query similar to the example below String tabela = "NomeTabela"; Var x = db.("NomeTabela").ToList(); Something like this where the table name will change according to the…
-
1
votes2
answers83
viewsInsert comma after checking more than one name
foreach (var user in users) { var strTypesModel = ""; foreach (var typesModel in user.typesModel) { strTypesModel = strTypesModel + typesModel.Name; } user.TypesModelAggregate = strTypesModel; } I…
-
1
votes0
answers200
viewsPagination problem X.Pagedlist
I am trying to implement X.Pagedlist pagination, but on this line: @Html.PagedListPager(Model, pagina => Url.Action( "Index", new { pagina, search = ViewBag.Busca })) I’m getting the following…
-
1
votes2
answers150
viewsHow to configure custom Error 500 page?
Good afternoon, I’m starting to write mistakes. In my web config is installed as follows: Error 404 <customErrors mode="On" defaultRedirect="~/Erro/Error-404.html"> <error statusCode="404"…
-
1
votes0
answers61
viewsASP.NET Button only executes the method when clicked several times
Hi, I’m facing a very annoying problem because I have a page function to cancel the weigh-in. Weighing because this page is an application that works internally by communicating with a scale over…
-
1
votes1
answer59
viewsConnectionstring according to scenario
Hello, good morning! I have a project where there are two scenarios, which is approval and production. In this same project I created two connectionstrings, setting one for each scenario. In the…
-
1
votes1
answer61
viewsDatasource C# - Problem reading multiple data
I have a code, where he opens the browser and works within a certain page. On this page, I have some fields, where I look for information from a spreadsheet in excel (xlsx). On this same page, there…
-
1
votes1
answer706
viewsForm data validation in ASP.NET MVC
Is there a faster and simpler way to validate a form’s data in ASP.NET? so that I don’t have to be doing as many treatments as in the example below: [HttpPost] public ActionResult Attempt(string…
-
1
votes1
answer966
viewsInsert via Entityframework error "IDENTITY_INSERT is set to OFF"
I have several models and for some reason one of them presents the following error: Cannot insert explicit value for identity column in table 'tbl_boleto' when IDENTITY_INSERT is set to OFF. I…
-
1
votes1
answer48
viewsMapping with Entity Framework
Good afternoon, when analyzing a code I see in the mapping the following line: this.HasKey(t => t.IdEstudante); I understand what you do in practice but not theoretically, refers to the object…
-
1
votes0
answers298
viewsEnter in Textbox by calling button event
When I hit enter in a textbox, it is calling the "Filtrogridview" and then it calls the button event. <div class="TextRight"> <asp:TextBox ID="txtBuscaNome" runat="server"…
-
1
votes0
answers282
viewsProblem with paging due to loading of Gridview and Dropdownlist on the same Page.Postback
Next, I have a gridview that it needs to be inside a postback to be able to perform an update when selecting a checkbox. The problem is that I have a filter using a DropDownList, if I leave mine…
-
1
votes0
answers243
viewsCrystal Report set value text size in a graph
I am using Crystal Report version 13 in an application with Aspnet Webforms. I am developing reports with graphics and displaying the value of "data labels". My problem is that I can’t modify the…
-
1
votes2
answers69
viewsGlobalization does not work when deploying
I deployed an ASP.NET application on a machine located in the center of the United States and now it behaves as being American even with the instruction below in the web.config file:…
-
1
votes1
answer55
viewsado.net version of iis
Good, I have the following code: private void AspNet35() { String sWebSite = "W3SVC/1"; DirectoryEntry site = new DirectoryEntry("IIS://localhost/" + sWebSite + @"/Root"); try {…
-
1
votes1
answer98
viewsAdd a <div> to each <li> - Htmlgenericcontrol tag
I am reading an RSS XML and adding each news to a tag <li> I need every tag <li> stay within a tag <div>, how can I do this through Htmlgenericcontrol? That way <div>…
-
1
votes0
answers134
viewsXML deserialization in C# is returning null array even when XML has data
I’m trying to deserialize XML <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"…
-
1
votes1
answer239
viewsRegex to remove HTML Entity
I have an excerpt of HTML in which I extract some information. However in one of these HTML is coming the code + in the middle, which means the sign +. I tried a few ways but no removing that…
-
1
votes0
answers82
viewsWays to inform address
Good afternoon people, I have a question not very technical, but ways to get information. Here at the company we have a form for our users to inform service addresses. This form has the automatic…
-
1
votes1
answer182
viewsFormsauthentication causes an infinite redirect error - ASP.NET C#
Good afternoon, I am developing an ASP.NET application with C# that requires login, works and is being used this way: protected void Page_Load(object sender, EventArgs e) { SqlConnection conn = new…
c# asp.net visual-studio-2015 sql-server-2012 forms-authenticationasked 8 years, 5 months ago Kawaii 151 -
1
votes0
answers27
viewsHow to create a user in Asp.Net Identity by setting the Id I want?
When I set the Identityuser Id, for example, to 1000, when saving with Createuser the ID is 0. Observation 1: Table id aspnetusers is not as AUTO_INCREMENT. Observation 2: I changed the Identity…
-
1
votes1
answer500
viewsHow to pass a URL in the Parameter of an API
How to pass a URL to an API public class HTTPController : ControllerBase { [HttpGet("URL={URL}")] public JsonResult GETURL(string URL) { } } However when passing for example https://google.pt this…
-
1
votes1
answer63
viewsOnserverclick is not running
I am trying to create dynamic buttons to delete users from a database but onserverclick simply does not run the function. This is my code so far: yourHTMLstring += "<td>" +…
-
1
votes2
answers169
viewsC# ASP.NET - Get last value from a Stored Procedure Parameter
I have a Stored Procedure which inserts different fields. But however there is that when inserted I want to pick and place on the screen. It is entered into the database in the following way:…
-
1
votes3
answers236
viewsCompare two querys
I have a query that returns only the catechisms that went to the event: var catequizandosCheked = (from cat in db.Catequizando where cat.Eventos.Any(e => e.EventoID == eventoID) select new…
-
1
votes0
answers37
viewsHow to put images in the select tag in Asp-net core?
<select> <option background="https://lipis.github.io/flag-icon-css/flags/4x3/gb.svg">gb</option> <option…
-
1
votes0
answers195
viewsHighcharts use method to fill series
I am making an application in Asp.Net that is using Highchart charts and the javascript function I am using is this (taken from the net and placed on the aspx page): <script…
-
1
votes0
answers13
viewsIdentification of User Control?
I’m trying to use a User Control with VB and is created as follows: <%@ Control Language="VB" AutoEventWireup="false" CodeFile="SigaFormacao.ascx.vb" Inherits="SigaFormacao" %> Page using User…
-
1
votes1
answer41
viewsSearch using 2 types of info in the same text field!
I’m trying a filter with Razor, search in the same text field, 2 information, you can type CNPJ or wallet, when I load the requests page, already loads with the data of CNPJ and Wallet on the…
-
1
votes2
answers70
viewsChoose path index
Hello, I’m with a project . NET Core Razor. My page index is inside the folder Pages, and I would like to put my page index inside the Test folder that is inside the pages folder, for example…
-
1
votes0
answers549
viewsHow to place markers on the x-axis of a Chart line c#
I would like to know how to leave markers (such as a ball) on the X axes at each point of the graphic. Currently the graphic is like this: I wanted every month to be able to have a dot dot ball…
-
1
votes1
answer25
viewsHow to validate Date and Time to check together if they are larger than the current date and time
Sirs. I am trying to validate two fields (Date and Time) because they cannot be greater than the current date and time. There is a validation on the date but I need to validate the date and time…
asp.netasked 5 years, 2 months ago fabricio_wm 1,090 -
1
votes1
answer33
viewsPassing data between partitals Views
I have a huge form, it was broken using partial view, created the following doubt that I could not remedy in google, if these views are all of the same control, as I pass the data of partial view To…
-
1
votes0
answers1034
viewsHow to get the creation date of a c#file
I have a web system in c# and I am using framework 4.5 that accesses a database Firebird that is on a server, I am connecting to this database normally. Now I need to have access to the creation…
-
1
votes0
answers35
viewsTreat Customerror ASP.NET
Good morning, I was having an error publishing the Runtime error site, I created a blank ASPX page and added the tag to the web.config <customErrors mode="On"…
-
1
votes1
answer132
viewsStored asynchronous Procedure
When trying to run Process asynchronously public async Task<ActionResult> Index() { Stopwatch watch = new Stopwatch(); watch.Start(); ContentManagement service = new ContentManagement(); var…
-
1
votes0
answers46
viewsWeb.config ASP.NET The requested page cannot be accessed because the Related Configuration data for the page is invalid
I’m trying to post an Asp.net page on an IIS server from Somee.com.. and I get the error: "The requested page cannot be accessed because the Related Configuration data for the page is invalid." My…
-
1
votes3
answers621
viewsChange Asp.Net Core version
I installed version 3.0 of Asp.Net Core in my project, but I will need to change to an earlier one in the case of 2.2, there is some way to do this?…
-
1
votes2
answers485
viewsFunctionality of ! Ispostback
What is the real usefulness of this if(!Ispostback) of the page_load of the aspx pages? protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack) { //codigo } }…
-
1
votes1
answer96
viewsAsp.Net MVC Enable breakpoint instruction Javascript
When running the system it does not respect breakpoint and displays this message as shown in the image. According to this microsoft documentation should work like this.…
-
1
votes0
answers102
viewsHow to receive automatic notifications from Pagseguro?
I am implementing in the company where I work, the payment with Pagseguro. So far, I can generate a payment request and also receive the transaction code on my page. The problem is getting the…
-
1
votes0
answers198
viewsRoutes or Urls in ASP.NET Web Forms
I have an ASP.NET application with Webforms it is hosted as follows: http://meusite.com.br/MeuAplicativo/Seguranca/Login.aspx. I want that when you type in the browser…
asp.netasked 8 years, 3 months ago Mauricio Ferraz 2,074 -
1
votes0
answers322
viewsHow to create a dynamic div using database data
I have an administration page called (admin.aspx) with a table that has data that I will retrieve from my SQL Server database. My idea is on this page I select the data I need and by clicking a…
-
1
votes1
answer2400
viewsWebapi 2 Route Configuration web form application
About 6 months ago I am entering the MVC world, before I used a lot of Webforms and I confess that I have difficulties understanding how to configure the routes for a ApiController, from what I…
-
1
votes1
answer54
viewsCan I run ASP.NET on Nginx without Kestrel?
Is it possible to host my ASP.NET site directly on Nginx, just like PHP would? No need to use Kestrel and Nginx just as one proxy reverse.
-
1
votes1
answer254
viewsHow to create subscription in Asp.net with pagseguro
Hi I already searched everywhere and I couldn’t find how to integrate a subscription inside my system in Asp.net mvc with pagseguro. I used this code and my return is not working when I add this…
-
1
votes1
answer171
viewsWhat is Asp:Content?
What the hell is he? What does he do? 'Cause I can’t get one <body> inside him? I can change something in it via CSS? Type of project I did, vs default does not let the page run without this…
-
1
votes1
answer73
viewsError saving information from an ASP.NET page to the database
I have an application developed in ASP.NET (VB.NET) with two Radiobuttonlist and a Textbox where this information is returned by VB and recorded in the database, when clicking on record the system…
-
1
votes0
answers20
viewsWhy doesn’t Data Annotation recognize Datetime?
The view is not recognizing the date on formed {dd MM yyyy},ex:31/12/2020 . I’m already cracking my head for hours. *[Required] [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString =…
-
1
votes1
answer701
viewsRadio button in gridview
Good morning, everyone. I need to create an online form that will have questions that will be inserted daily in each user’s profile. All questions are stored in a database along with their…