Questions tagged [webforms]

Web Forms is a part of the ASP.NET web framework. It is one of the programming models you can use to create web applications. Web Forms are pages that users request through their browsers and that form the user interface (UI) that gives web applications their look and feel.

Web Forms is a part of the web application framework. It is one of the programming models you can use to create web applications.

Web Forms are pages that users request through their browsers and that form the user interface (UI) that gives web applications their look and feel. Web Forms are written using a combination of HTML, server controls, and server code. When users request a page (Web Form), the page's code is compiled and executed on the server, and HTML markup is generated and returned to the browser for rendering.

Further Reading

Tutorials

15183 questions
233
votes
9 answers

A potentially dangerous Request.Path value was detected from the client (*)

I am receiving the rather self explanatory error: A potentially dangerous Request.Path value was detected from the client (*). The issue is due to * in the request URL: https://stackoverflow.com/Search/test*/0/1/10/1 This url is used to populate…
user336245
202
votes
15 answers

Best way in asp.net to force https for an entire site?

About 6 months ago I rolled out a site where every request needed to be over https. The only way at the time I could find to ensure that every request to a page was over https was to check it in the page load event. If the request was not over…
codethrift
  • 2,257
  • 4
  • 17
  • 16
124
votes
7 answers

How to do a Jquery Callback after form submit?

I have a simple form with remote=true. This form is actually on an HTML Dialog, which gets closed as soon as the Submit button is clicked. Now I need to make some changes on the main HTML page after the form gets submitted successfully. I tried…
geeky_monster
  • 7,914
  • 17
  • 52
  • 81
115
votes
18 answers

How can I get the button that caused the submit from the form submit event?

I'm trying to find the value of the submit button that triggered the form to submit $("form").submit(function() { }); I could possibly fire a $("input[type=submit]").click() event for each button and set some variable, but that seems less elegant…
hunter
  • 58,834
  • 17
  • 108
  • 112
111
votes
13 answers

"The given path's format is not supported."

I have the following code in my web service: string str_uploadpath = Server.MapPath("/UploadBucket/Raw/"); FileStream objfilestream = new FileStream(str_uploadpath + fileName, FileMode.Create, FileAccess.ReadWrite); Can someone help…
All Blond
  • 1,133
  • 2
  • 7
  • 4
107
votes
34 answers

"Could not load type [Namespace].Global" causing me grief

In my .Net 2.0 Asp.net WebForms app, I have my Global.asax containing the following code: <%@ Application CodeBehind="Global.asax.cs" Inherits="MyNamespace.Global" Language="C#" %> However when I build I get an error stating- Could not load type…
gkdm
  • 2,275
  • 4
  • 19
  • 26
102
votes
14 answers

ASP.NET MVC Performance

I found some wild remarks that ASP.NET MVC is 30x faster than ASP.NET WebForms. What real performance difference is there, has this been measured and what are the performance benefits. This is to help me consider moving from ASP.NET WebForms to…
GateKiller
  • 68,419
  • 71
  • 167
  • 203
88
votes
6 answers

How is mime type of an uploaded file determined by browser?

I have a web app where the user needs to upload a .zip file. On the server-side, I am checking the mime type of the uploaded file, to make sure it is application/x-zip-compressed or application/zip. This worked fine for me on Firefox and IE. …
Kip
  • 99,109
  • 82
  • 222
  • 258
83
votes
13 answers

How to create dynamically

I want to create an input type text in my web form dynamically. More specifically, I have a textfield where the user enters the number of desired text fields; I want the text fields to be generated dynamically in the same form. How do I do that?
Mohammad Usman
  • 831
  • 1
  • 6
  • 3
82
votes
7 answers

How can I implement Ninject or DI on asp.net Web Forms?

There are plenty of examples for having it worked on an MVC application. How is it done on Web Forms?
nellbryant
  • 2,959
  • 4
  • 18
  • 16
81
votes
7 answers

How to include a partial view inside a webform

Some site I'm programming is using both ASP.NET MVC and WebForms. I have a partial view and I want to include this inside a webform. The partial view has some code that has to be processed in the server, so using Response.WriteFile don't work. It…
eKek0
  • 21,835
  • 24
  • 87
  • 117
81
votes
8 answers

ASP.NET postback with JavaScript

I have several small divs which are utilizing jQuery draggable. These divs are placed in an UpdatePanel, and on dragstop I use the _doPostBack() JavaScript function, where I extract necessary information from the page's form. My problem is that when…
ErnieStings
  • 6,033
  • 17
  • 43
  • 54
73
votes
4 answers

Disable form submission via Enter key on only _some fields

I want to retain the conventional 'form submits when i press Enter' behavior because users are familiar with. But by reflex, they often hit enter when they finish with a text input box - but before they are actually done with the complete form. I'd…
justSteve
  • 5,174
  • 18
  • 66
  • 131
72
votes
1 answer

ASP.NET Web Forms and ASP.NET Web Pages

What is the difference between ASP.NET Web Forms and ASP.NET Web Pages? Here it says that Web Pages and Web Forms are different approaches.
SocialCircus
  • 2,002
  • 6
  • 24
  • 34
70
votes
1 answer

Create custom User Control for Acumatica

I am attempting to create a custom User Control that is usable in the Acumatica Framework. Documentation is very limited so I was hoping someone may have some experience/examples of how best to implement? It appears possible by creating a WebControl…
Anth12
  • 1,847
  • 2
  • 22
  • 37
1
2 3
99 100