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

I want to detect client browser URL by this.Request.URL.AbsoluteUri.
I checked and found that this method get client browser URL but I can create a link (tag a) with response of this method.

I want to use this method for create a link to specific services because my web application has accessible in some networks with different IP and Address.

HTML
<a href="<% this.Request.Url.AbsoluteUri.ToString();%>">Test link</a>


How I can solve this problem?
Posted
Comments
Prasad Khandekar 13-Jun-14 7:23am    
Hello Reza,

Uri.AbsoluteUri Property gets the absolute URL. In order to create a link to a new service you have to first strip everything after the last "/") and then append the partial service end point path to that value.

Regards,
ZurdoDev 13-Jun-14 15:36pm    
If it is different IP and address why do you want to use the url of the current request?

1 solution

I solved my problem by using a variable for storing client IP address after that I used this variable.
 
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