Hi.
I'm just starting to shift to asp.net so forgive my question in case what i'm asking for is a obsolete function.
Using classic ASP, all of my form submission and links points to only one file which is like a index.asp, passing a hidden value indicating the type of processing it needed. From this index file, I check the hidden value passed then transfer the control to the appropriate "process" page, for this transfer of control I used "server.execute". Now using ASP wherein the form processing is embeded in the same page as the submitting form, is it still ok to use server.execute to transfer to another page after processing the page submitted? or should I use "response.redirect" instead? Or is there a better way to do this page redirection?
Thanks in advance.
Regards,
Well, in asp.net pages postback to themselves, so once you submit a form, its posting to itself.
You have different options:
1- Response.Redirect(); -- redirect you to another page
2- Server.Execute(); -- will execute a another page get the contents of it, but you will stay in the same page
3- Server.Transfer(); -- will transfer you to another page keeping the url of the first page in the address bar
Hope that helps.
regards
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment