469,923 Members | 1,277 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,923 developers. It's quick & easy.

PostBack Concept

I want to know if the PostBack concept applies to HTML web-based forms,
regardless of what programming technologies we use: For example, ASP,
ASP.NET, Java, CGI, etc...

PostBack means to send the HTML form to the web server? Since most of the
time I heard this term in ASP.NET circle, thats why I raise this question.

Please advise. Thanks!
Jul 19 '05 #1
3 10962
In ASP.Net the whole idea is to treat a form like you would a windows form.
That is, the same page handles all of the events. Thus, in ASP.Net the
forms are set to POST to themselves and a built in property is available
called PostBack.

Before .Net I never even considered using a postback. All of my forms would
consist of Form1 where the user enters the information, then Page2 where the
information was processed and the user was given a response.

Since .Net I've realized the advantages of that approach and most of my
forms postback to the same page.

So is it a .Net only thing. Not at all. As long as the form's Action
property is set to the same page, it's what I'd call a postback. Most of my
forms look like this......

<%
if request.form("postback")="true" then
'note that true is in quotes because it's a string not a boolean
Call processTheForm
end if
%>

<form method=post action="thisSamePage.asp">
<input type=hidden name=postback value="true">
etc...
</form>

"Matthew Louden" <ma*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I want to know if the PostBack concept applies to HTML web-based forms,
regardless of what programming technologies we use: For example, ASP,
ASP.NET, Java, CGI, etc...

PostBack means to send the HTML form to the web server? Since most of the
time I heard this term in ASP.NET circle, thats why I raise this question.

Please advise. Thanks!

Jul 19 '05 #2
"Matthew Louden" wrote ...
PostBack means to send the HTML form to the web server? Since most of the
time I heard this term in ASP.NET circle, thats why I raise this question.


Definately in this instance I think more asp.net - there is a IsPostBack
feature enabling you to check whether or not this is the first time or not
that the form has been loaded.

Of course for normal ASP you'll find it mean more like "and now I want to
post this form back" - ie, if perhaps mandatory fields were filled in
incorrect and you were letting the server validate these or something...

This is my belief anywho...

Regards

Rob
Jul 19 '05 #3
Yes, I too have been doing this for years as if the user supplies an invalid
value you don't need to redirect as you can remember all the fields values.

<input type="text" name="Email"
value="<%=Server.HTMLEncode(Request.Form("Email")) %>">
"TomB" <sh*****@hotmailXXX.com> wrote in message
news:uS**************@TK2MSFTNGP09.phx.gbl...
In ASP.Net the whole idea is to treat a form like you would a windows form. That is, the same page handles all of the events. Thus, in ASP.Net the
forms are set to POST to themselves and a built in property is available
called PostBack.

Before .Net I never even considered using a postback. All of my forms would consist of Form1 where the user enters the information, then Page2 where the information was processed and the user was given a response.

Since .Net I've realized the advantages of that approach and most of my
forms postback to the same page.

So is it a .Net only thing. Not at all. As long as the form's Action
property is set to the same page, it's what I'd call a postback. Most of my forms look like this......

<%
if request.form("postback")="true" then
'note that true is in quotes because it's a string not a boolean Call processTheForm
end if
%>

<form method=post action="thisSamePage.asp">
<input type=hidden name=postback value="true">
etc...
</form>

"Matthew Louden" <ma*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I want to know if the PostBack concept applies to HTML web-based forms,
regardless of what programming technologies we use: For example, ASP,
ASP.NET, Java, CGI, etc...

PostBack means to send the HTML form to the web server? Since most of the time I heard this term in ASP.NET circle, thats why I raise this question.
Please advise. Thanks!


Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Matthew Louden | last post: by
4 posts views Thread by kpg | last post: by
11 posts views Thread by antonyliu2002 | last post: by
2 posts views Thread by John Kotuby | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.