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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -