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
-
5
votes2
answers1346
viewsDifference between ADO.NET and Dapper
What are the differences between Orms? When to use one and when to use the other? What are the disadvantages of each?
-
5
votes2
answers203
viewsWhen to use "Try catch" in layered application?
Let’s say I have my layers Controller Business Repository so it is necessary to create this block in the 3 layers or create only in the controller? If I do this she ensures that every code that is…
-
5
votes2
answers801
viewsKeep table records synchronized between two different databases
We are performing a system migration, where some restructurings will be done in the current bank in a new bank. Basically I will have two banks BancoVelho and BancoNovo, having to keep both of them…
asp.net-mvc asp.net sql-server entity-frameworkasked 8 years, 5 months ago Pablo Tondolo de Vargas 5,444 -
5
votes1
answer303
viewsPass object to Webservice
I’m starting the development using Webservice + Windows Form and I did some silly methods passing parameters, however, I came up with the idea of passing an object as parameter where the Web Service…
-
5
votes2
answers828
viewsAbort Thread through another C#process
I am developing an application in ASP.Net 5.0, where it needs to start a task through a Thread Secondary, as the example below: //Inicia processo de pesquisa var ppBlo = new ProcessoPesquisaBLO();…
-
5
votes2
answers700
viewsDropdownlist quantity Items
Good morning, I’m using dropdownlist in the asp.net to load some data coming from the database, however I do not know the amount that will be shown, because it depends on the fill in the database. I…
-
5
votes1
answer1694
viewsThe 'Oraoledb.Oracle' Provider is not Registered on the local machine
I have a problem that is limiting my work, it is the following, I created a Webservice with a connection string to an oracle database : OleDbConnection con = new…
-
5
votes1
answer146
viewsLINQ Lambda | Query Syntax VS Method Syntax Performance
Doubt regarding the construction and performance of querys using Query Syntax and Method Syntax / LINQ Query Syntax: var VendorQuery = from v in vendors where v.CompanyName.Contains("Toy") orderby…
-
4
votes3
answers629
viewsLog into page using the bank ID in ASP.NET
I need to make a page that can be accessed in the following format: www.exemplo.com/id/123qwe That one 123qwe is the ID of a database line, where I’ll get all the data to fill out the page. So far…
-
4
votes2
answers747
viewsEF6 Code First Relation between entities
I am trying to create a Condominium data model in ASP.NET with SQL Server. I stumbled on the creation of the interface proprietario(1) with the fracao(many). The error returned is: The INSERT…
-
4
votes2
answers625
viewsWeb Api 2 - Routing not working
I created a web service REST using Web Api 2, and in development everything is functional. I am using a small variation of the default route: config.Routes.MapHttpRoute( name: "DefaultApi",…
-
4
votes2
answers231
viewsRemoving comments in the HTML sent by the server
We all know the good old HTML comments: <!-- Oi, eu sou o Goku! --> The point is: there is some way to delete HTML comments that the server sends to the client? I think such configuration is…
-
4
votes1
answer350
viewsDefault browser autocomplete does not work in my Webforms application
I’m using the Google Chorme and he’s got the option autocomplete enabled, so much so that I can store a login to the Facebook. However, in my application ASP.NET Webforms, on the screen of login me…
-
4
votes2
answers576
viewsHow to get the last id inserted in Asp.net?
I’m making a website on ASP.NET, and I need to register a user/client. The question is: as soon as I enter the values in the table users, I need to get the id of this table and use in the table…
-
4
votes1
answer125
viewsASP.NET vNext is interpreted like PHP?
ASP.NET vNext is presenting a lot of news in relation to previous versions, among them is the idea of not compiling the codes, just modify and already see what happens on the page. This means that…
-
4
votes3
answers1705
viewsFileupload without refresh on the page?
I realized it takes one refresh on the full page to get the file from the server side. I would have some way without refresh to perform this operation? I know it’s possible with Ajax, as it would…
-
4
votes1
answer405
viewsCompare two date attributes in the database with two Textbox
How can I compare a range of two dates? data_Inicio date data_Fim date textbox_inicio textbox_fim I can do this on the ASP.NET side and the goal is that my start date will never be less than my end…
-
4
votes2
answers492
viewsMount Datatables with Repeater
I’m riding a DataTables jQuery with Peater ASP.NET C#. What am I doing wrong? I’ve been using the code. <body> <form id="form1" runat="server"> <div> <asp:Repeater…
-
4
votes1
answer1537
viewsDifficulties writing a user friendly (global) web config url
I asked that same question in the English version but I was unsuccessful! I have an application that will be translated into three languages en/en/es. Until then I’ll use Globalresources, I have no…
-
4
votes1
answer66
viewsWhat are and how the following statements work in Web Forms pages: <% %>, <%# %> and <%: %>
I don’t know what they are or what to call them. Are they tags, statements? What are they? In practice, I noticed some characteristics. <% %> This statement accepts executable code, but…
-
4
votes1
answer2742
viewsDisable <Asp:Button after being clicked
Project in: Webform, C#, ASP.net I need to disable the button after being clicked. Today it is like this: <asp:Button ID="btn_Enviar" runat="server" CssClass="btn btn-primary" Text="Enviar"…
-
4
votes1
answer502
viewsCreation of dynamic controls in ASP.Net
I’m looking to create a component for a standard criminal record. In the project I am developing, I am using Web Forms, where I have my masterPage with the layout of the site (menu, header and…
-
4
votes1
answer153
viewsHttpmodule: How to handle Httpapplication errors without Httpcontext?
I have been finding a particularly interesting situation. I have a generic error handling routine implemented within a HttpModule, and recently I noticed a strange behavior: The event…
-
4
votes1
answer1812
viewsHow to consume an "asmx" Webservice via Jquery Ajax
I created a button that calls the search method Ajax to consume a Web Service Asxm. Because the Ajax does not consume the Web Service? <asp:Button ID="btnPesquisar" runat="server"…
-
4
votes2
answers1140
viewsProtect ASP.NET source code (aspx)
I have a question regarding ASP.NET: In the case of PHP when an application is placed on the server means to put the source code of the same. In the case of ASP.NET, (specifically C# with pages in…
c# asp.net .net security-guard software-engineeringasked 9 years, 3 months ago Anderson Brunel Modolon 1,111 -
4
votes2
answers658
viewsReport is not displayed in Report Viewer when you pass parameters
I am trying to display a report, but when I pass the parameters via code it does not load the report, if I let it open the browser and pass the parameters at runtime works normally. Code of the…
asp.netasked 9 years, 10 months ago Alan Almeida 633 -
4
votes1
answer1217
viewsWhat problems can occur when using the "http://tempuri.org/" namespace on our webservices?
When creating a webservice, in my case using ASP.NET, I always change the default namespace to something related to my project, usually using the website URL for this. But lately I have had the need…
asp.net web-service soap namespace xml-namespacesasked 9 years, 10 months ago Guilherme de Jesus Santos 6,566 -
4
votes1
answer1474
viewsScheduled tasks on the web
In Google Inbox allows the creation of reminders and allows you to postpone them to a certain date and time. The reminder is then taken from the main screen and when this exact date and time comes…
-
4
votes1
answer2873
viewsHow to set today’s date as default value in a texbox as date input type?
I have a research page for a sales report and I use a textbox that generates a input type "date", and whenever the page loads the value of the field is "dd/mm/yyyy". I would like that whenever the…
-
4
votes2
answers1380
viewsCapture Machine Identification with C#
Good morning, I have several computers with the same output IP, how can I get any information that leads me to know which computer a request came from? I use C# Asp . Net MVC
-
4
votes1
answer604
viewsAJAX request error - ASP. Net and Jquery
I have an aspx file where I created a script with an AJAX call to execute the method populaGridMembros on the table gwMembros, the method is working perfectly and returning a string in JSON format,…
-
4
votes2
answers10482
viewsDoubt about "Error Converting data type varchar to float"
Error Converting data type varchar to float This error is occurring when performing a Update in a table, follows below the code: SqlCommand cmd = new SqlCommand("UPDATE Notas SET nota = '" +…
-
4
votes2
answers304
viewsHow to store the Selecteditem value from Dropdownlist in the database?
I want to register a client and one of his attributes is sex Database: the sex attribute is a nvarchar ASP.NET: I am working with a listview to enter client data <asp:SqlDataSource ID="clientes"…
-
4
votes1
answer105
viewsASP.NET shares resources in the same pool?
I have today on my IIS 8 sites on ASP.NET using the same pool. On average they consume 800mb of RAM. I ended up dismembering them (separate pools) and it seems to be consuming 1,5GB in total. I…
-
4
votes1
answer495
viewsWebbrowser with input type file
Friends, I am building a virtual robot to act on a particular site. In a given action I need to upload a file to the site, but when the robot clicks on the button <input type="file"> logically…
-
4
votes1
answer829
viewsUrl friendly in ASP.NET Web Forms
I would like to know how to make URL friendly in C# ASP.NET. I tried to use in the file: global.asax but it didn’t work.
-
4
votes1
answer4462
viewsChange port or something on IIS Express. Is there a way?
How can I change a port or something in Visual Studio 2013’s IIS Express.
-
4
votes2
answers680
viewsDisable css and image caching in the browser
Recently, I developed a project that had some drastic changes in its design, mainly by the side of css and images. In this, accessing it on some machines, I verified that to visualize its new design…
-
4
votes1
answer1174
viewsRazor C# list and sublist with List<String> (originally "how to check if an HTML element already exists")
I need to know if an HTML element already exists, in my loop, if it exists I use it, if it doesn’t exist I create a. How would you do it inside a @foreach (var item in Model){ ... } Following the…
-
4
votes2
answers579
viewsReliability and Security of Sessions
I’ve been reading a little bit about security with sessions (both in ASP.NET and in PHP), and I read in some places that sessions, especially in PHP, can be easily stolen (even more easily if the…
-
4
votes2
answers169
viewsHow to capture the Exception generated by a method whose access is not authorized by a particular user profile
How can I send the user a message that the operation he wants to do is not authorized? I have in my View a button that calls a Javascript function <button id="btninicio"…
-
4
votes1
answer13542
viewsStartar site on IIS is returning error 500
Trying to learn how to set up a site on IIS, by typing the site URL, this gives the following error: Server Error 500 - Internal server error. There is a problem with the resource that you are…
-
4
votes1
answer502
viewsAuthenticate user efficiently and quickly (without setbacks, Identity x Manual)
I need to create a system amusing using a validation (user, password). I have experience with Webform, I started already studied a little MVC but still don’t feel safe to create a complete…
-
4
votes2
answers254
viewsCRUD with images , working with Httppostedfilebase and byte[]
We are using Entityframework with Codefirst and Database Postgresql. There are some tables that should save images, and the POCO classes are referenced as byte array. Up to that point all quiet. I…
-
4
votes1
answer1852
viewsHow to use @Html.Validationmessagefor to change the text box class
I bought a bootstrap template, the validation of the controls is done by a class that leaves the controls red. This would be the classes form-group has-error Only that I never used this way, I’m…
-
4
votes1
answer83
viewsTFS Api - Query error with Datetime
I am trying to perform a query using the TFS API where I need to get all the Workitems that have been edited from a certain date, however I get the following error: An unhandled Exception of type…
-
4
votes2
answers756
viewsHow to Download FTP Files
I need to download txt files that are on an FTP, I tried to use the following repackaged code below for this but it does not do what I need. The first parameter of the Downloadfile method is the URL…
-
4
votes2
answers424
viewsMutiplos projects in MVC and Webapi
I’m looking for if there are any project models that involve multiple MVC and Webapi projects. In the solution I’m thinking about designing (if possible) a content management solution for multiple…
-
4
votes1
answer555
viewsBootstrap Nav-tab event to run on the c#server side
I am using the following code to use tabs in my Asp.Net application, is there any way to add an event so that when switching tab run some event on the server side equal to the ajaxcontroltoolkit…
-
4
votes1
answer1210
viewsHow to decrease byte array size that represents an image
I have an array of bytes in Base64 that is in a string in C#. It represents an image. The size of the string is between 50 and 80 thousand characters. I wanted to know if it has how to decrease this…