html - Pass RadioButton selected value to different form -


i have 3 radio buttons, when select 1 want pass value different form can use when submit posted. however, cannot seem figure out how.

my ultimate goal take selected value of radio button , pass form can use it. don't want put radio buttons inside of form well. wont let me use environmentname unless use in form upon submission.

view

<div class="btn-group-vertical pull-right" data-toggle="buttons">                 <label class="btn btn-primary" style="@displayoak">                     @html.radiobuttonfor(model => model.environmentname, "oak")                     oak                 </label>                 <label class="btn btn-primary" style="@displayqa">                     @html.radiobuttonfor(model => model.environmentname, "qa")                     qa                 </label>                 <label class="btn btn-primary" style="@displayprod">                     @html.radiobuttonfor(model => model.environmentname, "prod")                     prod                 </label>              </div>  <div style="overflow: auto">    @using (html.beginform())    {        @html.hiddenfor(m => m.renderview)        @html.hiddenfor(m => m.processid)        @html.hiddenfor(m => m.taskid)        @html.hiddenfor(m => m.userid)        @html.hiddenfor(m => m.deliverableid)        @html.hiddenfor(m => m.tasktypevalue)        @html.hiddenfor(m => m.environmentname)     }             //omitted code </div> 

controller

 [httppost]  public actionresult pendingtasks(string submit, pendingtasksmodel model)  {      ehbprocesstype taskprocesstypecode;      ehbtasktype tasktypecode;      guid deliverableid;      guid userid;      pendingtaskresult actual;      string result;      guid taskid;      guid taskprocessid;      pendingtaskresult pendingtaskresult;      initializeservice(request.form["environmentname"]); //this want use variable       // omitted code   } 


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -