I am working asp.net mvc3. I have an action link like following:
@Html.ActionLink("Yes", "Admin", "Foo", null, new { @class = "link" })
How can I modify this to create a link in https as oppose to http as I have set my controller action with [RequireHttps]
There is a difference. Html. ActionLink generates an <a href=".."></a> tag whereas Url. Action returns only an url.
Ever looked at the documentation or the Intellisense that Visual Studio offers you?
@Html.ActionLink(
"Yes", // linkText
"Admin", // actionName
"Foo", // controllerName
"https", // protocol
null, // hostName
null, // fragment
null, // routeValues
new { @class = "link" } // htmlAttributes
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With