How to create url string in asp.net MVC

I am trying to make a url string for one of my routed routes in a CS file. I can do this in aspx file using html helpers. How do I create a url in a CS file?

+2


source to share


2 answers


You can use the UrlHelper class .



+2


source


Create an instance of System.Web.Mvc.HtmlHelper in your C # method and use it to call the Html Helper methods.



+1


source







All Articles