By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,946 Members | 712 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,946 IT Pros & Developers. It's quick & easy.

Page Hierarchy confusion...

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Man, you're comparing Apples and Oranges here.
Granted, you're still dealing with rendered HTML, requests, responses,
sessions, etc. However, ASP.NET encapsulates all of that inside of a
totally difference platform.

I've worked with a number of developers making the transition from ASP to
ASP.NET, both as a Trainer and a Manager. The best thing you can do is to
take a step back and start from the ground up. If you're working with
VB.NET as your supporting language, you have to take another step back
because there is very little in common with these two languages except for
the basic syntax and the name (VB).

Take a look at this article:
http://www.4guysfromrolla.com/webtech/041601-1.shtml

There are also a lot of ASP to ASP.NET books out there that are invaluable
resources for you.

Side Note, sessions arent't all that bad anymore, you can have them managed
by a database, so all of your session information does not reside in the
server's memory.
"J'son" <si*******@hotmail.com> wrote in message
news:44**************************@posting.google.c om...
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

Nov 18 '05 #2

P: n/a
Thanx David.. I think I can do what I need to using Context.Handler
and some public variables. That way the page can validate itself and
then Server.Transfer to the next page.

Thanx again..

J'son

"David Jessee" <dj*****@houston.rr.com> wrote in message news:<eZ**************@TK2MSFTNGP12.phx.gbl>...
Man, you're comparing Apples and Oranges here.
Granted, you're still dealing with rendered HTML, requests, responses,
sessions, etc. However, ASP.NET encapsulates all of that inside of a
totally difference platform.

I've worked with a number of developers making the transition from ASP to
ASP.NET, both as a Trainer and a Manager. The best thing you can do is to
take a step back and start from the ground up. If you're working with
VB.NET as your supporting language, you have to take another step back
because there is very little in common with these two languages except for
the basic syntax and the name (VB).

Take a look at this article:
http://www.4guysfromrolla.com/webtech/041601-1.shtml

There are also a lot of ASP to ASP.NET books out there that are invaluable
resources for you.

Side Note, sessions arent't all that bad anymore, you can have them managed
by a database, so all of your session information does not reside in the
server's memory.
"J'son" <si*******@hotmail.com> wrote in message
news:44**************************@posting.google.c om...
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

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.