title: conditional value of hidden field in asp.net
body: <p>This is my ASP Mark Up for radio button list</p>
  
  <pre><code>&lt;asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"&gt;
      &lt;ContentTemplate&gt;
  
          &lt;asp:RadioButtonList ID="rbcourse" runat="server" AutoPostBack="True" Height="54px" RepeatDirection="Horizontal" style="text-align: left; font-weight: 700;" Width="385px"&gt;
              &lt;asp:ListItem &gt;BA&lt;/asp:ListItem&gt;
              &lt;asp:ListItem&gt;BSC&lt;/asp:ListItem&gt;
              &lt;asp:ListItem&gt;BSCN&lt;/asp:ListItem&gt;
              &lt;asp:ListItem&gt;BCOM&lt;/asp:ListItem&gt;
          &lt;/asp:RadioButtonList&gt;
     &lt;/ContentTemplate&gt;
  
  &lt;/asp:UpdatePanel&gt;
  </code></pre>
  
  <p>this is the markup for hidden field</p>
  
  <pre><code>&lt;asp:HiddenField ID="hffee" runat="server" Value="122" /&gt;
  </code></pre>
  
  <p>this is the sql add parameter value for hffee</p>
  
  <pre><code>cmd.Parameters.AddWithValue("@hffee", Val(hffee.Value))
  </code></pre>
  
  <p>Now i need if user clicks say on BA radio list item the value of HFFEE which is hidden field and whose value in property is set to nill shall be say 1200 if user selects BSC then the value of hffee shall be 1500 i nut shell i need dynamic value of hidden field which will get stored on sql server on btn submit</p>
  
  <p>i am changing the check box like enable disable checked true false etc on this radio button list 
  on v.b code on the event rbcourse_selected index change  which is radio button list
  i am just writing</p>
  
  <pre><code>Protected Sub rbcourse_SelectedIndexChanged(sender As Object, e As EventArgs) Handles rbcourse.SelectedIndexChanged
  
      If rbcourse.SelectedIndex = "0" Then (0 is the item value of BA)
          ge.Checked = True  (ge is the text name of check box and it is working)
  </code></pre>
  
  <p>on that same manner i need </p>
  
  <pre><code>If rbcourse.SelectedIndex = "0" Then (0 is the item value of BA)
   then 
  </code></pre>
  
  <p>hffe.value="1200" like this</p>