J
J'son
Ok, thanx in advance for all who can help me. I've coded in ASP for
years, but am new to ASP.NET. I have a small ecommerce store im
migrating over to ASP.NET (C#) and I am confused about this tag:
<form runat="server">
I know that when a form has "runat=server", any ACTION (at design
time) I specify will be overridden and that the page will ALWAYS
postback to itself. However, my store has 4 pages - Products, Customer
Info, Check Out, and Thank you/Sorry. In ASP, it went like this:
Products Page: User selects products, hits submit. Form action takes
user to Customer Info, all Request.Form info is present. Request.Form
Product info is persisted by using hidden fields.
Customer Info Page: User supplies shipping info, cc #, et, hits
submit. Form action takes user to Check Out, all Request.Form info is
present. All previous Request.Form info is persisted by using hidden
fields.
Check Out Page: User views summary, likes what he sees and clicks
"Confirm". Page posts to Thank you/Sorry where actual store processing
takes place and user is shown a receipt and a thank you or a "Sorry..
heres the problem" message.
Since ASP.NET supplies the default form with runat=server tag, I was
wondering if there is now a better (more efficent) way of doing
things. Should I:
1. Remove the runat=server tag and proceed as before?
2. Keep the runat=server tag, use IsPostBack on each page, somehow
persist the Request.Form values into something else (no Sessions
plz!), and then Redirect/Transfer to the next page?
3. Or am I missing something else here.. ViewState manipulation from
one page to the next?
Just looking for ideas...
Thanx!
J'son
years, but am new to ASP.NET. I have a small ecommerce store im
migrating over to ASP.NET (C#) and I am confused about this tag:
<form runat="server">
I know that when a form has "runat=server", any ACTION (at design
time) I specify will be overridden and that the page will ALWAYS
postback to itself. However, my store has 4 pages - Products, Customer
Info, Check Out, and Thank you/Sorry. In ASP, it went like this:
Products Page: User selects products, hits submit. Form action takes
user to Customer Info, all Request.Form info is present. Request.Form
Product info is persisted by using hidden fields.
Customer Info Page: User supplies shipping info, cc #, et, hits
submit. Form action takes user to Check Out, all Request.Form info is
present. All previous Request.Form info is persisted by using hidden
fields.
Check Out Page: User views summary, likes what he sees and clicks
"Confirm". Page posts to Thank you/Sorry where actual store processing
takes place and user is shown a receipt and a thank you or a "Sorry..
heres the problem" message.
Since ASP.NET supplies the default form with runat=server tag, I was
wondering if there is now a better (more efficent) way of doing
things. Should I:
1. Remove the runat=server tag and proceed as before?
2. Keep the runat=server tag, use IsPostBack on each page, somehow
persist the Request.Form values into something else (no Sessions
plz!), and then Redirect/Transfer to the next page?
3. Or am I missing something else here.. ViewState manipulation from
one page to the next?
Just looking for ideas...
Thanx!
J'son