开发者

dynamically Frame the URl in c#

开发者 https://www.devze.com 2022-12-19 06:04 出处:网络
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.i

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); } }

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号