passing parameters from page to page

O

only_me

Having a bit of trouble here moving to .net. very familiar with the classic
ASP way of doing things but can't quite see the wood for the trees here in
..net

Classic ASP
On a form you have a number of form controls to accept user input, using the
the submit button passes those parameters across to next page in
request.form(keyname) fashion

..NET
Same as above but the norm, if you want to use form validation - which I
do, is that the form posts back to itself, so now in the button handler of
the equivelent of the Submit button I could do

If page.valid then
response.redirect (next_page)
end

But of course this won't pass across any form parmeters to the next , will
it

Whats the correct way to do this in .net ( I'm using VS)

I know you can change the .postbackurl of a button, but then I wouldn't get
my validation done, would I ?

Got a bit of mental block on this

TIA
 
M

Mark Rae

If page.valid then
response.redirect (next_page)
end

But of course this won't pass across any form parmeters to the next , will
it

Why do you need a second page?
 
G

Guest

I know i have developed some that use only a couple of webforms. Look for
example at the City of North Vancouver website: www.cnv.org

ASP used a VB scripting language in which you had to divide the application
into manageable chunks of code, so one page used to post its results to the
next page that contained hundreds of script lines to handle the post action.
If you had a complex function (in a business or data layer) you would have
created for it a COM object.

ASP.NET, on the other hand, allows you to use programming languages that
employ Object Oriented Programming techniques, without the need to create COM
objects. The post back from each page needs not to be handled in a separate
page because you can arrange all of your functions in various classes that
are called from one page.

You might find this set of articles from MSDN helpful in migrating from ASP
to ASP.NET
http://www.msdn.microsoft.com/asp.net/learning/learn/migratingfromasp/default.aspx
 
M

Mark Rae

M

Mark Rae

Ok thanks all

Seems I've got a lot more reading to do yet

a little knowledge eh ?

The biggest piece of advice I can give you is not to consider ASP.NET as the
next version of ASP, and *especially* not to consider VB.NET as the next
version of VB6, let alone VBScript.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top