ASP.NET(vb.net) Request.Form() - Request.Form() : The Form collection retrieves the values of form elements posted to the HTTP request body, with a form using the POST method.
ShotDev Focus:
- ASP.NET(vb.net) Request.Form()
Syntax
Request.Form(element)[(index)|.Count]
Example
AspNetRequestForm.aspx
<%@ Page Language="VB" %> <script runat="server"> Sub btnButton1_Click(sender As Object, e As EventArgs) Me.lblText.Text = Request.Form("txtName") End Sub </script> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <form runat="server"> <input type="text" name="txtName" value='<%=Request.Form("txtName")%>'> <br /> <asp:Button id="btnButton1" onclick="btnButton1_Click" runat="server" Text="Button"></asp:Button> <hr /> <asp:Label id="lblText" runat="server"></asp:Label><br> </form> </body> </html>
Screenshot