Asp.net programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this Asp.net and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Asp.net Website by URL, How to Play YouTube Videos in Asp.net by using Jquery , Jquery Change div background on mouseover in asp.net , JQuery UI Datepicker (Calendar) etc.

Monday, August 4, 2014

Access RadioButtonList Item Using VBScript

RadioButtonList Item Using VBScript

Visual Basic is a client side Scripting Language as like Java Script.here we want ti Access RadioButtonList Item Using VBScript.



Access Item from RadioButtonList Using VBScript:

<script runat="server" language="vb">
  Sub Page_Load()
   if Page.IsPostBack then
    lblmsg.Text = "You have selected the following: " + radio1.SelectedItem.Value
   end if
  End Sub
</script>

This is a Script code by this we can Access control on client side.

<html>
  <head>
    <title>Radio Button List Example</title>

   <% write Above Script code in head tag .............%>
Asp.net Radiobutton control
Asp.net Radiobutton control

  </head>
  <body>
    <asp:label id="lblmsg" runat="server" />
    <br /><br />
    Which city do you wish to look at hotels for?
    <br /><br />
    <form id="Form1" runat="server">
   <asp:radiobuttonlist id="radio1" runat="server">
   <asp:listitem id="opt1" runat="server" value="option1" />
   <asp:listitem id="opt2" runat="server" value="option2" />
   <asp:listitem id="opt3" runat="server" value="option3" />
   </asp:radiobuttonlist>
      <br /><br />
      <input type="ok">
    </form>
  </body>
</html>
Web page preview 

No comments:

Post a Comment