Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have some a tag like :

XML
<a href='/Video/Cat/1'>Introduce</a>
<a href='/Video/Cat/2'>Review</a>
and in other group i have other links like :

<a href='/Video/Group/1'>Most View</a>
<a href='/Video/Group/2'>Most Popular</a>


now i want to search and query in server side by two parameter such as most poulars in Review Groups . and when i click on each link search result change to my choice conditions . in this case how i can send two parameter to search action when click on just one link ? i want to when i click on Review link and then click on most popular the search method get two parameter catId and groupId .

thanks
Posted
Updated 29-Sep-13 1:42am
v3
Comments
Sampath Lokuge 29-Sep-13 7:40am    
Can you share the server side code,which you have written ?
Sampath Lokuge 29-Sep-13 7:46am    
What're 1 and 2 ? Is that fixed values or change according to some conditions ?
Saeid.Babaei86 29-Sep-13 7:59am    
i want to when i click on category links then group id and cat id send to action too .

1 solution

Using Html.ActionLink you can easily pass multiple parameters like below
C#
@Html.ActionLink("Add Visit", "ActionName", "ControllerName", 
                  new { id = Model.Id, secondParameter = Model.yourValue }, null)

http://msdn.microsoft.com/en-us/library/system.web.mvc.html.linkextensions.actionlink.aspx[^]
Hope this helps
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900