Tangara G

Tangara G

  • NA
  • 298
  • 93.5k

How do I update the changes of the radio button selection ?

Sep 16 2016 1:56 AM
Hi experts,
 
 
I would appreciate a basic tutorial on selected radio button, the changes will be made to the database.
 
Here's the html page I have written :
 
  1. <%@ Page Title="" Language="C#" MasterPageFile="~/StoreClerk.Master" AutoEventWireup="true" CodeBehind="ChangeCollectionPoint.aspx.cs" Inherits="LogicUniversity.ChangeCollectionPoint" %>  
  2. <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">  
  3. </asp:Content>  
  4. <asp:Content ID="Content2" ContentPlaceHolderID="StoreClerkContent" runat="server">  
  5.     <br />  
  6.     <h3>Change Collection Point</h3>  
  7.   
  8.       
  9.         <div class="form-group">  
  10.         <label class="col-sm-2 control-label"><h4>Current Collection Point:</h4></label>  
  11.   
  12.         <div class="col-sm-8">  
  13.             <div class="radio">  
  14.                 <label>  
  15.                     <input type="radio" name="collectionPoint" value="Stationery Store (09:30am)" checked>  
  16.                         Stationery Store (09:30am)  
  17.                 </label>  
  18.             </div>  
  19.   
  20.             <div class="radio">  
  21.                 <label>  
  22.                     <input type="radio" name="collectionPoint" value="Management School (11:00am)">  
  23.                         Management School (11:00am)  
  24.                 </label>  
  25.             </div>  
  26.               
  27.             <div class="radio">  
  28.                 <label>  
  29.                     <input type="radio" name="collectionPoint"  value="Medical School (09:30am)">  
  30.                         Medical School (09:30am)  
  31.                 </label>  
  32.             </div>  
  33.   
  34.             <div class="radio">  
  35.                 <label>  
  36.                     <input type="radio" name="collectionPoint" value="Enginnering School (11:00am)" checked>  
  37.                         Enginnering School (11:00am)  
  38.                 </label>  
  39.             </div>  
  40.   
  41.             <div class="radio">  
  42.                 <label>  
  43.                     <input type="radio" name="collectionPoint" value="Science School (09:00am)">  
  44.                         Science School (09:00am)  
  45.                 </label>  
  46.             </div>  
  47.               
  48.             <div class="radio">  
  49.                 <label>  
  50.                     <input type="radio" name="collectionPoint"  value="Uni Hospital (9:30am)">  
  51.                         Uni Hospital School (9:30am)  
  52.                 <br />  
  53.                 </label>  
  54.             </div>  
  55.             <asp:Button ID="Update_CollectionPoint" runat="server" OnClick="Update_CollectionPoint_Click" Text="Update" />  
  56.         </div>              
  57.     </div><!-- end form-control -->     
  58.     
  59. </asp:Content> 
 The idea is that whenever a Dept Head and Representative made the changes, the collectionPoint will be changed in the database.  The Dept Head ID and Representative are tied to the RoleId and RoleName in the Role table.
 
I have googled but so far can't find any tutorial that is directly related to my question.  I wish there is a beginner book that I can read thru to study all these basic functionality.....

Answers (5)