473,385 Members | 1,333 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Postback mechanism in asp.net

Hi all,

I am new to asp.net i want to ask some help about postback mechanism
of web page.

CAn anyone tell me how postback mechanism is handle by asp.net worker
process. Means why worker process know that this page is posted back
or this page is requested first time. Means which parameter of
httpwebrequest send this information.

If i am wrong please correct me,

thanks in advance.

Jul 24 '07 #1
4 1737
AFAIK this is jsut the standard HTTP mechanism that is it checks if this is
a GET or POST request... (Request.ServerVariables("HTTP_METHOD") friom the
top of my head). You could use also the "Reflector" tool to check what is
the code being IsPostBack...

--
Patrice

"archana" <tr**************@yahoo.coma écrit dans le message de news:
11********************@q75g2000hsh.googlegroups.co m...
Hi all,

I am new to asp.net i want to ask some help about postback mechanism
of web page.

CAn anyone tell me how postback mechanism is handle by asp.net worker
process. Means why worker process know that this page is posted back
or this page is requested first time. Means which parameter of
httpwebrequest send this information.

If i am wrong please correct me,

thanks in advance.

Jul 24 '07 #2
There are two ways to request a page, one is GET and one is POST. When you
enter a url into the address bar, or follow a link it uses GET to just pass
the url and retrieve the html.

When you submit a FORM you can actually specify if the FORM uses GET or
POST. The advantage with POST is that the form data is "hidden" and can be
unlimited in size (there is probably a limit somewhere). Whereas with GET
the form data is on the querystring and is easily seen and updated, and
there is a limit to how long the url can be, so there is a limit to the size
of your data.

You can look in the ServerVariables collection at "REQUEST_METHOD" to see if
you page is being requested via a GET or a POST. When asp.net renders your
page it puts a FORM that uses POST as a method, so when that page is
requested, if it is being POSTd then it knows it is a postback.

I'm sure it doesn't just go on the request method though, with the form will
be certain data that asp.net tests is there to verify it is a genuine
postback.

"archana" <tr**************@yahoo.comwrote in message
news:11********************@q75g2000hsh.googlegrou ps.com...
Hi all,

I am new to asp.net i want to ask some help about postback mechanism
of web page.

CAn anyone tell me how postback mechanism is handle by asp.net worker
process. Means why worker process know that this page is posted back
or this page is requested first time. Means which parameter of
httpwebrequest send this information.

If i am wrong please correct me,

thanks in advance.

Jul 24 '07 #3
AFAIK this is jsut the standard HTTP mechanism that is it checks if this is
a GET or POST request... (Request.ServerVariables("HTTP_METHOD") friom the
top of my head). You could use also the "Reflector" tool to check what is
the code being IsPostBack...

--
Patrice

"archana" <tr**************@yahoo.coma écrit dans le message de news:
11********************@q75g2000hsh.googlegroups.co m...
Hi all,

I am new to asp.net i want to ask some help about postback mechanism
of web page.

CAn anyone tell me how postback mechanism is handle by asp.net worker
process. Means why worker process know that this page is posted back
or this page is requested first time. Means which parameter of
httpwebrequest send this information.

If i am wrong please correct me,

thanks in advance.

Jul 24 '07 #4
asp.net checks if __VIEWSTATE is in the form data to determine if
IsPostback is true.

asp.net pages can use either the get or post method, so thats not a
reliable method. a post means the form data follows the headers, a get
means its contained on the url as args. form data is passed as name
value pairs. the content-type header specifies if there is form data.

-- bruce (sqlwork.com)
archana wrote:
Hi all,

I am new to asp.net i want to ask some help about postback mechanism
of web page.

CAn anyone tell me how postback mechanism is handle by asp.net worker
process. Means why worker process know that this page is posted back
or this page is requested first time. Means which parameter of
httpwebrequest send this information.

If i am wrong please correct me,

thanks in advance.
Jul 24 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Christopher D. Wiederspan | last post by:
I'm wondering if there's a way to use javascript to disable a ASP.NET web page before it starts to postback. Specifically, here's what I'm running into. I've got a webform that has an autopostback...
1
by: blue | last post by:
When the user clicks a button on my form, I disable the page (document.body.disabled = true;) so they can't submit the form multiple times before the postback occurs. When I do this, it doesn't...
2
by: Ashish | last post by:
Hi All, I have a server runnable textbox control. I also have a server side button object but I hook up javascript to it to show a modal dialog. Upon return it places the value in the textbox...
2
by: Bruce W.1 | last post by:
There's something I can't figure out. I added some javascript behavior to my datagrid, just like in this article, except in C# instead of VB: ...
3
by: Andy Fish | last post by:
Hi, I think the title pretty much says it all. Not sure if I'm missing something obvious here. I can see how the server side events work with the postback mechanism but I can't see any way of...
1
by: Patrick.O.Ige | last post by:
What is PostBack for
1
by: Louis-Philippe Dumoulin | last post by:
Hi, I have the following problem in asp 1.1. On my web page, when I click on a menu, a postback is generated. On the post back, I create dynamically with LoadControl a WebGrid (from InterSoft)...
7
by: Tim_Mac | last post by:
hi, using .net 2.0, i have a web form with lots of textboxes, drop-down-lists etc. There are lots of required field validators and regular expression validators. When i click the 'save' button,...
0
by: rvdnieuwenhuizen | last post by:
Hi, The problem I cannot seem to solve: I have a page with a button control. In the On_Click eventhandler I dynamically add one TextBox each time the button is clicked. I add the textboxes to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.