I am trying to make c# ASP.net code that when I press on the submit form button it will show a table with the form's answers. My only problem is when I'm pressing the submit button nothing happens... can you please tell me where is my problem? Here is my C# code:
public string st = " ";
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Form["submit"] != null)
{
st += "<table dir = 'ltr' align = 'center' border = '1'>";
st += "<tr><th colspan = '2' align = 'center'> form results </th>
</tr>";
string uName = Request.Form["uName"];
string Pass = Request.Form["Pass"];
string eMail = Request.Form["eMail"];
st += "<tr><td> User Name: </td><td>" + uName + "</td></tr>";
st += "<tr><td> Password </td><td>" + Pass + "</td></tr>";
st += "<tr><td> eMail </td><td>" + eMail + "</td></tr>";
st += "</table>";
}
}
And here is the line from .aspx code:
</table>
<% Response.Write(st); %>
this is the top of the aspx page:
<%@ Page Title="" Language="C#" MasterPageFile="master.master"
AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="mainMasterPage.Register" %>
Thanks!
Tal
FIXED
instead of type Request.Form["..."]
I type Request["..."]
and thats it!
Thank you all