Link to home
Start Free TrialLog in
Avatar of psaini172000
psaini172000Flag for India

asked on

System.Web.HttpContext.Current.Request.Url.ToString() wok on local station but not working on server

hi i m using following code. it working fine on local station but not showing result output when i upload this code on to server.

Is it need any iis setting. m using asp.net 2.0
any suggestion will be appriciated.

Thanks
sidharth
protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                string strCurrenturl1 = System.Web.HttpContext.Current.Request.Url.ToString();
 
                string url = HttpContext.Current.Request.Url.OriginalString;
                Label1.Text = strCurrenturl1;
               // Label2.Text = url;
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
        }

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of paololabe
paololabe
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Are you sure the event is executed ? for example set Label1.Text="Hello" ti check it.
Avatar of psaini172000

ASKER

i hav set the version already
IT DID'T SOLVE MY PROBLEM