0

I am trying to create a url with query string in MCV application Here is the code

 <%= Html.ActionLink(Resources.Strings.SignIn_lbl, "SignIn", "Account", new { lang = ViewData["user-language"] })%>

and here is the generated url

mydomain.com/Admin/Account.aspx?Length=7
1
  • What do you have defined as the route? Why is it generating a aspx page? Commented Aug 19, 2015 at 15:26

1 Answer 1

2

You're most likely using the wrong overload of Html.ActionLink

If I remember correctly, you may be using the overload that also takes in the htmlAttributes parameters, so just pass in null.

<%= Html.ActionLink(Resources.Strings.SignIn_lbl, "SignIn", "Account", new { lang = ViewData["user-language"] }, null)%>
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.