Click here to Skip to main content
15,886,830 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have aspx page in my project. In this page i have a linkbutton, When i click this linkbutton i want to redirect to same page with differnt text in this linkbutton. Also i want to change the address of thr url depends upon the text in the linkbutton. But the page same for all action I just want to change the text for the link button and address in the url.

Thanks,
Velkumar
Posted

As far as change in URL is concern if you use some tricks like Server.Transfer or Response.Redirect, it may help you. If you want proper mapping url then its an advance concept like URL Rewriting, where you can actually rename Url at run time.

Linkbutton rename you can handle it by using
C#
if (Page.IsPostBack)
       {
           ;
       }
 
Share this answer
 
v2
Comments
Velkumar Kannan 16-May-12 2:03am    
Could you post some examples?
To show different URLs in the browser you can use the concept of URL rewriting. To change the label you can handle it programmetically.


UPDATE:
[SM]: Read here: URL Rewriting with ASP.NET[^]
MSDN: URL Rewriting[^]
 
Share this answer
 
v2
Comments
Velkumar Kannan 16-May-12 2:02am    
Could you post some examples?
Sandeep Mewara 16-May-12 2:31am    
Answer updated with URL.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900