469,587 Members | 2,704 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,587 developers. It's quick & easy.

navigating between pages

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
Nov 15 '05 #1
2 3178
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='newpag e.aspx'"

Hope this helps
Bjoern Wolfgardt
"zee" <zu******@cs.ufh.ac.za> schrieb im Newsbeitrag
news:07****************************@phx.gbl...
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

Nov 15 '05 #2
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='newpag e.aspx'"

Hope this helps
Bjoern Wolfgardt
"zee" <zu******@cs.ufh.ac.za> schrieb im Newsbeitrag
news:07****************************@phx.gbl...
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

Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.