Click here to Skip to main content
14,664,507 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi,
I have two web form in my web application that I create they in asp.net I want to have labels in my forms and when I press a label go to other form and overhand
Posted

Rate this:
Please Sign up or sign in to vote.

Solution 1

Hello,

try it with Response.Redirect("Page.aspx") or use a linklabel and set the 'targeturl'.
   
Comments
_Starbug_ 10-Aug-11 9:56am
   
thank you solved but for your second answer your means is hyperlink?
reid0588 10-Aug-11 10:20am
   
you can have a linkbutton. It looks like a hyperlink but is actually a button and needs to code behind it e.g the reponse.redirect("...") to work. It does exactly the same job as a button just looks like a hyperlink...purely for asthetics :-)
adnama 10-Aug-11 10:36am
   
if you solved it mark it as solved pls
Rate this:
Please Sign up or sign in to vote.

Solution 2

If you don't need to do any serverside processing, you can use window.location = 'newurl.aspx' in Javascript (or simply a hyperlink with a href!) on the client side. That will save you a server hit (navigating to a page that then causes a redirect is two hits).

If you need to do some server processing and then go to a new page, then Response.Redirect is probably what you want.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100