navigating between pages

  • Thread starter Thread starter zee
  • Start date Start date
Z

zee

HELP!
Hi, I really need help navigating between pages in my web
application. When I press a button I want to go to a
particular page in my Visual Studio .net application.

Plase help
Thank you in advance
Zee
 
Hi,

if your question is howto direct a user to another page if he presses a
button (not only in VS.NET) you have 2 choices.
1.) Drop a button on your webform. Double click this button. Write:
Response.Redirect("anotherpage.aspx", [optional:true]);
This will be handled on server side and you can check what ever you want.

2.) Create a HTML button with a onclick event.
<input ................. onclick="ToNewPage()">

insert the javascript function (ToNewPage) to redirect the user
<script language="javascript"
function ToNewPage(){
document.location.href = 'newpage.aspx';
}
</script>

You don't have to write a function for this. You can also do it like this:
onclick="javascript:document.location.href='newpage.aspx'"

Hope this helps
Bjoern Wolfgardt
 
Back
Top