creating https actionlink
Asked Answered
F

1

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]

Furlani answered 28/6, 2012 at 15:36 Comment(2)
You should probably read thisAntung
What does your route definition look like?Storax
Z
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
)
Zuckerman answered 28/6, 2012 at 16:15 Comment(1)
Saucer of milk, table 2Jereme

© 2022 - 2024 — McMap. All rights reserved.