Questions tagged [asp.net]

ASP.NET is a Microsoft web application development framework that allows programmers to build dynamic web sites, web applications and web services. It is useful to use this tag in conjunction with the project type tag e.g. [asp.net-mvc], [asp.net-webforms], or [asp.net-web-api]. Do NOT use this tag for questions about ASP.NET Core - use [asp.net-core] instead.

ASP.NET was first released in January 2002 with version 1.0 of the .NET Framework and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime (), allowing programmers to write ASP.NET code using any supported .NET language.

Typically, ASP.NET uses a WebForms style of development, which was also the original method of developing web applications in ASP.NET. Web forms are a model which mimics the control/event model of classic Windows Forms development providing the illusion of stateful pages.

In March of 2009, Microsoft released version 1.0 of the ASP.NET MVC Framework. As an alternative model to web forms, this framework applies the Model-View-Controller pattern to web applications in ASP.NET.

As ASP.NET includes its own controls library for web forms, wrapping HTML controls and adding functionality to them, any ASP.NET controls have as markup <asp:ctrl_name></asp:ctrl_name>.

For example:

<asp:Label ID="Label1" runat="server"></asp:label>

Will be rendered like a <span></span>

For ASP.NET MVC, instead of a control library, there exist HTML helper methods which make it easier to blend HTML markup with code, while allowing developers to create views in mostly pure HTML.

There are two templating engines for ASP.NET MVC. The original one is and uses .aspx and .ascx files for views and partial views, respectively. The other, newer one is , which focuses on developer productivity by providing more concise and less obtrusive syntax.

More information at: www.asp.net

It is useful to use this tag in conjunction with the project type tag e.g. , , or . DO NOT use this tag for questions about ASP.NET Core - use instead.

Development Tips:

Tips for good website design, which loads and works faster

Initial release:

January 2002

Stable Release:

Stable release 4.8 (18 Apr 2019)

Latest Preview Release:

Preview release 6.0.0-preview.3 (8 Apr 2021)

Important Questions

Essential Downloads

References

Books:

Chat Room

IDE

373735 questions
46
votes
2 answers

What is the purpose of Antlr package in Visual Studio 2013 ASP.NET project?

The ASP.NET (web forms) project template in Visual Studio 2013 includes several packages. I'm trying to figure out which ones are essential (may need to create a separate question for this). The post at…
Alek Davis
  • 10,628
  • 2
  • 41
  • 53
46
votes
8 answers

Basic authentication in ASP.NET MVC 5

What steps must be done to implement basic authentication in ASP.NET MVC 5? I have read that OWIN does not support cookieless authentication, so is basic authentication generally possible? Do I need a custom attribute here? I am not sure about how…
Sonic
  • 815
  • 1
  • 8
  • 13
46
votes
6 answers

Can't access WEB API with ip:port but can with localhost:port during VS debug mode

I am trying to write an WEB API from .net and trying for my Android Application to query some data from the sql server database. I have the web api written and it works well in debug mode. My question is I notice the url of that application is…
noobiehacker
  • 1,099
  • 2
  • 12
  • 24
46
votes
2 answers

How to handle Images using WebAPI

Questions What are the different ways to POST/GET images to my service? I think I can either use Base-64 text in JSON or stay native as binary. My understanding is that by converting the image into text, there is a significant increase is package…
Jamie Dixon
  • 4,204
  • 4
  • 25
  • 47
46
votes
4 answers

How to debug w3wp clr.dll error

My client has an ASP.NET application installed on two production servers (balanced with NLB, but that's irrelevant). Both servers crash every 3-4 hours with the following event viewer logged error: Faulting application name: w3wp.exe, version:…
cristi71000
  • 1,094
  • 2
  • 10
  • 16
46
votes
3 answers

System.ArgumentException: The table type parameter must have a valid type name

I am trying to pass in a user defined table type into a query in C#. the type is defined with 2 columns (org and sub org) this is what my code looks like: DataSet ds = new DataSet(); try { DataTable FilteredOrgSubOrg = new…
Madam Zu Zu
  • 6,437
  • 19
  • 83
  • 129
46
votes
10 answers

Font awesome inside asp button

This is my asp:button code which is not rendering font awesome's icon but instead shows the HTML as it is:
Jack
  • 7,433
  • 22
  • 63
  • 107
46
votes
9 answers

IIS - can't access page by ip address instead of localhost

I'm trying to publish ClickOnce application and test it locally. I want to provide installation link so I need to update location with an IP address otherwise I won't be able to install it (because localhost is translated into computer name and…
KlimczakM
  • 12,576
  • 11
  • 64
  • 83
46
votes
23 answers

jquery cycle IE7 transparent png problem

I'm having trouble getting jquery cycle to work when I have transparent png files in IE7 It's fine in Firefox and Chrome but in IE (version 7) I get a black colour where the png transparency is during the fade. Can this be made to work right?
emre
46
votes
5 answers

Storing more information using FormsAuthentication.SetAuthCookie

I am using aspx and c# for a setting a authentication cookie for a login. FormsAuthentication.SetAuthCookie(UserName, True) I want to store more information in the same cookie. Can I add values to this authentication cookie or do I have to use a…
Eden
  • 699
  • 2
  • 12
  • 18
46
votes
18 answers

Get full path of a file with FileUpload Control

I am working on a web application which uses the FileUpload control. I have an xls file in the full filepath 'C:\Mailid.xls' that I am attempting to upload. When I use the command FileUpload1.PostedFile.FileName I cannot get the full filepath…
Dhanraj
  • 509
  • 1
  • 5
  • 14
46
votes
4 answers

Create Json dynamically in c#

I need to create a Json object dynamically by looping through columns. so declaring an empty json object then add elements to it dynamically. eg: List columns = new List{"FirstName","LastName"}; var jsonObj = new {}; for(Int32…
Alaa Osta
  • 4,249
  • 6
  • 24
  • 28
45
votes
9 answers

Unable to find the requested .Net Framework Data Provider in Visual Studio 2010 Professional

Why am I getting "Unable to find the requested .Net Framework Data Provider" when trying to setup a new datasource in Visual Studio 2010 Professional? My stats: Windows 7 64bit 16gig RAM Visual Studio 2010 Professional SQL Server 2008 (server A,…
cbmeeks
  • 11,248
  • 22
  • 85
  • 136
45
votes
2 answers

WebMethod vs ScriptMethod

I have a .NET 3.5 aspx place with a method marked with the [WebMethod] attribute. I'm calling this with jQuery, sending JSON in both directions. This all works great. My question is, what does [ScriptMethod] do when applied to an method? I've tried…
Steve Johnson
45
votes
3 answers

Get the server machine name in ASP.NET MVC?

I have some code that generates an email and I want to include the actual server machine name that is running in the body of the email. (It's a clustered web environment, so I want to find out what actual machine is sending the email.) I know I can…
leora
  • 188,729
  • 360
  • 878
  • 1,366
1 2 3
99
100