Linking pages
-
Just a simple question for someone. I've just starting using asp.net and i was wondering what is the proper way to link pages. I'm writing an application and when the login button is clicked i want it to load another page. I think i heard something bout only have one page and reloading it with whatever you want displayed or something like that, maybe im taking crap... anyway just wondering if some could help me out thanks
-
Just a simple question for someone. I've just starting using asp.net and i was wondering what is the proper way to link pages. I'm writing an application and when the login button is clicked i want it to load another page. I think i heard something bout only have one page and reloading it with whatever you want displayed or something like that, maybe im taking crap... anyway just wondering if some could help me out thanks
This is a pretty broad question and I would recommend you do a few web-development tutorials first. But here is a very brief introduction; There are two ways of navigating to other pages, links and forms. Links are your normal
a href="otherpageurl"
. In your example above though you want a form. In ASP.NET the form submits back to itself when a button is clicked and in the event-handler for that button your code logic runs. In this case you would authenticate the details the user has provided and if they are correct you would use aResponse.Redirect
method to navigate to another page. If they are not correct then in most cases you would display an error message and not redirect the user. I recommend though that you get an ASP.NET book and start there. regards, Paul Watson Bluegrass South Africa Christopher Duncan quoted: "...that would require my explaining Einstein's Fear of Relatives" Crikey! ain't life grand? Einstein says... -
This is a pretty broad question and I would recommend you do a few web-development tutorials first. But here is a very brief introduction; There are two ways of navigating to other pages, links and forms. Links are your normal
a href="otherpageurl"
. In your example above though you want a form. In ASP.NET the form submits back to itself when a button is clicked and in the event-handler for that button your code logic runs. In this case you would authenticate the details the user has provided and if they are correct you would use aResponse.Redirect
method to navigate to another page. If they are not correct then in most cases you would display an error message and not redirect the user. I recommend though that you get an ASP.NET book and start there. regards, Paul Watson Bluegrass South Africa Christopher Duncan quoted: "...that would require my explaining Einstein's Fear of Relatives" Crikey! ain't life grand? Einstein says...