asp.net mvc - Accessing drop down list value from controller -


i added drop down list view shown below.

<select id="colorstyle" name="colours"><option value="0">red</option><option value="1">yellow</option> 

how can selected value controller please.

add colorstyle parameter in post method

    [httppost]     public actionresult yourmethod(int colorstyle, ...)     {         ...     } 

Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -