Submit Method in ASP.NET
-
Hi: With the advent of .NET i really have not quite used Request.Form,Request.Querystring.But with zhoujun's question i think i too need to know What is the default method of submitting values to an asp.net page even if it posts back to itself.Is it Post Or Get.. Why Need Parking lots in Bars when Drunken Driving is Prohibited
-
Hi: With the advent of .NET i really have not quite used Request.Form,Request.Querystring.But with zhoujun's question i think i too need to know What is the default method of submitting values to an asp.net page even if it posts back to itself.Is it Post Or Get.. Why Need Parking lots in Bars when Drunken Driving is Prohibited
By default, browsers use "get." You have to explicitly state in your
<form>
tag that themethod="post"
. In ASP.NET, if the form is run server-side, I believe it uses "post."
"The greatest danger to humanity is humanity without an open mind."
- Ian Mariano
http://www.ian-space.com/ -
Hi: With the advent of .NET i really have not quite used Request.Form,Request.Querystring.But with zhoujun's question i think i too need to know What is the default method of submitting values to an asp.net page even if it posts back to itself.Is it Post Or Get.. Why Need Parking lots in Bars when Drunken Driving is Prohibited
Hi Pradip, The default in normal HTML is GET. But under .NET Framework, we normally use
and it ALWAYS uses POST. You may check out the javascript function that framework uses which is called _doPostBack() We do not do Request.Form like that. Perhaps we assign an event handler to the button and handle them. The framework manages the mappings. Check out the login page and other forms in iBuySpy Portal/Store SourceCode, which would really be very helpful to understand the flow. Deepak Kumar Vasudevan