dynamically Frame the URl in c#
In c# i need to fram开发者_Python百科e the folllowing URL dynamically,here Action is redirectURL and the Controller is Books,when i post the page i send the url to some other page in follwing format.is it posible to frame the URL with "localhost:7187" dynamically? http://localhost:7187/Books/redirectURL
Folllwing way i framed the url(http://localhost:7187/Books/redirectURL) dynamically
Classname.WebsitePath + VirtualPathUtility.ToAbsolute(Url.Action("redirectURL", "Books"));
public static string WebsitePath { get { return HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority); } }
精彩评论