Set Button text (VB.net) : Button « Asp Control « ASP.Net






Set Button text (VB.net)

<%@ Page Language="VB" %>
<script language="vb" runat="server">

    Sub Page_Load(Source As Object, E as EventArgs)
      If Not IsPostBack Then
        MyButton.Text = "OK"
        MyDropDownList.Items.Add("http://www.java2s.com")
        MyDropDownList.Items.Add("http://www.google.com")
      End If
    End Sub
  </script>
<html>
 <body>
  <form id="WebForm1" method="post" runat="server">
    <asp:DropDownList id=MyDropDownList runat="server"/>
    <asp:button id=MyButton runat="server" Text=""/>
  </form>
 </body>
</html>

           
       








Related examples in the same category

1.Event in code behind file (VB.net)
2.asp:button: command name and arguments (VB.net)
3.Event driven page (VB.net)
4.asp:button event to change the label text (VB.net)
5.Button action Command and Parameter (VB.net)
6.Add action listener to a server Button (VB.net)
7.asp button postbackurl (C#)
8.asp button on client click (C#)
9.Button counter: click and change button label (C#)
10.Add action listener to asp Button by delegate (C#)
11.Read input and do the calculation in Button action listener (C#)
12.Button event Handler (C#)
13.onmouseover and onmouseout events
14.OnClientClick event
15.CausesValidation="False"