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

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -