Using an HTML Form Control: get value in input box and display (VB.net) : TextBox « HTML Control « ASP.Net






Using an HTML Form Control: get value in input box and display (VB.net)

<%@ Page Language=VB Debug=true %>
<script runat=server>
Sub SubmitBtn_Click(Source As Object, E as EventArgs)
    MyMessage.InnerHTML = "Hello " & YourName.Value
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Using an HMTLForm Control</TITLE>
</HEAD>
<BODY>
<form 
    runat="server"
    id="MyForm"
    method="Post"    
    disabled="False"
    visible="True"
>
<Span
    id="MyMessage"
    runat=server
>
</Span>    
<BR>    
Name: <BR>
<Input
    id="YourName"
    runat="server"
    type="text"
>
<BR>
<BR><BR>
<button 
    id="Button1"
    runat="server"
    onserverclick="SubmitBtn_Click" 
>
Submit
</button>
</Form>
</BODY>
</HTML>
           
       








Related examples in the same category

1.HTML Control: Input (C#)