Click here to Skip to main content
Sign Up to vote bad
good
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 15 May '12 - 19:24


3 solutions

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
if (Page.IsPostBack)
       {
           ;
       }
  Permalink  
Comments
Velkumar Kannan - 16 May '12 - 2:03
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[^]
  Permalink  
Comments
Velkumar Kannan - 16 May '12 - 2:02
Could you post some examples?
Sandeep Mewara - 16 May '12 - 2:31
Answer updated with URL.
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 483
1 Arun Vasu 315
2 OriginalGriff 250
3 Maciej Los 218
4 Aarti Meswania 170
0 Sergey Alexandrovich Kryukov 9,670
1 OriginalGriff 7,409
2 CPallini 3,968
3 Rohan Leuva 3,352
4 Maciej Los 2,861


Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 16 May 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid