0

i have 2 link on page PictureList

<%= Html.ActionLink("pic", "PictureList", "Admin")%>

and

<%= Html.ActionLink("pic", "PictureList", "Admin", new { id = item.MenuId })%>

after click on second link, first link catch id parameter. how can it be solved?

2
  • How is your controller setup? Can you post your controller code? And the same for your routes.... Commented Mar 4, 2010 at 19:27
  • controller is simple, routing default Commented Mar 5, 2010 at 8:15

1 Answer 1

1

I think, your link's redirecting to same action. So you may want to assign the value of id

<%= Html.ActionLink("pic", "PictureList", "Admin", new { id = 0 })%>
Sign up to request clarification or add additional context in comments.

2 Comments

it works only if i use this code <%= Html.ActionLink("Картинки", "PictureList", "Admin", new { id = 0 }, null)%> in other case id add parameter ?Length=5
I didnt understood what you want to say but i guess length is a parameter, did you bind it in routing?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.