I have a view that has a radio button group on it. The radio button really has nothing to do with my model. It just decides what path the code will take (what stored procedure to call based on what selection they made). How do I get the selection value to the controller?

Something like this:

    Select the option describing what you want to do:
    <label>@Html.RadioButton("selectProcess", "NewLetter", new { @id = "NewLetter" })Create a New Letter</label>
    <br />
    <label>@Html.RadioButton("selectProcess", "LetterInProgress", new { @id = "LetterInProgress" })Edit a Letter in Progress</label>
    <label>@Html.RadioButton("selectProcess", "GeneratedLetter", new { @id = "GeneratedLetter" })Edit a Letter that has been Generated</label>
    <label>@Html.RadioButton("selectProcess", "AppendGeneratedLetter", new { @id = "AppenGeneratedLetter" })Append a Generated Letter</label>

    <input type="submit" value="Go" />


Not sure if I need these id's in here, but I just want to have a method in my controller that receives the selected value and calls one stored procedure or another (as part of my model)...the selected options do not represent a field in the model.

I'm not a good front-end person, so I know I might be going about this backward.

Related posts

Recent Viewed