One of my requirement I need to
send mail to particular user with some content and the link for my current
opened job. The problem I have was faced like the URL is generated dynamically.
We can’t predict from where user opened the job. For solving the issue the
below line of code helped me.
System.Windows.Browser.HtmlPage.Document.DocumentUri.ToString()
System.Windows.Browser.HtmlPage.Document.DocumentUri.ToString()
var Link =
System.Windows.Browser.HtmlPage.Document.DocumentUri.ToString().Split('?').GetValue(0).ToString() + "?" + “Action=VIEW,RequestNumber=”
+
RequestNumber.ToString();
System.Uri uri = new Uri(Link);
var host = uri.Scheme + "://" + uri.Host + "/";
No comments:
Post a Comment