473,395 Members | 1,496 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

switch(Request.QueryString("handler")) in .Net?

hi
in my old Asp pages I used Jscript as below that is a single .asp page would
contain various subcodes. Is it the same in Asp.net?

switch (Request.QueryString("handler").Item)
{
case "load":
...
break
case "save":
...
break
}
Nov 18 '05 #1
2 1827
nope.. you dont have to depend on those query string / post variables to do
most of the things.... specially deciding what your script (its a class
now... so your object ) does next.
Instead you use web contols like say image button or button and you use the
on click server side event handler to write the code for each....

if you are using code behind and using VS.net... just double click the html
page... that will take you to the load event of your class....

if you double click say the button... it will bind the event handler with
the right delegate and give you a event handler like it used to in VB.
if that button was submit button.. then you write the code to submit the
data...
if it was cancel.. you just redirect the user... stuff like that....

get yourself a good book on asp.net..... and welcome to the world of object
oriented web programming...

--
Regards,

HD
Better Late than Never...
"Davíð Þórisson" <db**@hi.is> wrote in message
news:ep**************@TK2MSFTNGP12.phx.gbl...
hi
in my old Asp pages I used Jscript as below that is a single .asp page would contain various subcodes. Is it the same in Asp.net?

switch (Request.QueryString("handler").Item)
{
case "load":
...
break
case "save":
...
break
}

Nov 18 '05 #2
it can be....sure

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Davíð Þórisson" <db**@hi.is> wrote in message
news:ep**************@TK2MSFTNGP12.phx.gbl...
hi
in my old Asp pages I used Jscript as below that is a single .asp page would contain various subcodes. Is it the same in Asp.net?

switch (Request.QueryString("handler").Item)
{
case "load":
...
break
case "save":
...
break
}

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.