views:

47

answers:

1

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?

+1  A: 

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