Author: Suan Ngaihte | Posted on: 12/19/2008 10:52:23 PM | Views : 319

Hi All,
 This may sound a kind of silliness, but please bear me. What I wanted to do is to make the NavigateUrl of a Asp.net Hyperlink Control uses only the value I assigned.
Here is the scenario. I have a Hyperlink control in my page and
1. The page is in the folder "root/Medical/View" directory.

2. I assigned the NavigateUrl as follow: hpView.NavigateUrl = "/PageViewPlayerTreatments/Default.aspx?tratId=5397"
3. When the page complete the loads and rendering the hpView.NavigateUrl is converted to "http://localhost/Medical/View/PageViewPlayerTreatments/Default.aspx?tratId=5397"
4. What I wanted here is to exclude "Medical/View" from the hpView.NavigateUrl control
5. What i want is, it should be converted to "http://localhost/PageViewPlayerTreatments/Default.aspx?tratId=5397".
Please note that "PageViewPlayerTreatments" is not a directory, it is just a literal char ...

Go to the complete details ...