ameliablue
New Member
this is the property which give me site root path\[code\]public static string SiteRootPath { get { string host = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority); string appRootUrl = HttpContext.Current.Request.ApplicationPath; if (string.IsNullOrEmpty(appRootUrl) || appRootUrl == "/") { return host + "/"; } else { return host + appRootUrl + "/"; } } }\[/code\]i do like this\[code\]string path = EMS.DAL.DALHelper.SiteRootPath + "Home.aspx";\[/code\]then i do this\[code\]string script = "<script language='javascript' >alert('User registered successfully');window.location.replace('" + path + "');</script>";Page.RegisterStartupScript("alert", script);\[/code\]This redirects me to home page and works perfectly fine on localhost but not on the IIS where the site is published.when i check the page source only this is found "alert('User registered successfully');" inside script tags ??Not able to solve it.Any ideas ??