7

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]

tereško
  • 58,060
  • 25
  • 98
  • 150
amateur
  • 43,371
  • 65
  • 192
  • 320

1 Answers1

16

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
)
Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928