Click here to Skip to main content
15,896,466 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
hi all,
can some one tell me how to
Forming a query string based on the values selected in multiple dropdowns and textbox in (MVC3) Razor on button click.

actually i have four dropdown respectively Country,City,Category,SubCategory and one textbox. now i want to pass these values from one view to other controller in mvc(3) Razor.
thanks
naveen sharma
Posted
Updated 23-Dec-11 4:15am
v3
Comments
Sandeep Mewara 23-Dec-11 14:19pm    
And whats the issue in passing them?

1 solution

As a rule of thumb, you should not form a query out of this data, you should create one or more parametrized queries and substitute parameters in already existing commands. A concrete mechanism depends on database provider you use, it could be either positional or named. You did not share what provider do you use, so I don't want to give your examples for all possible cases.

—SA
 
Share this answer
 
v2

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