main.aspx
<body>
<form> id="form1" method="post" runat="server">
<asp:TextBox ID="TKullanici" runat="server" Height="27px"
style="text-align: left" BorderColor="Silver" BorderStyle="Solid"
Font-Size="Medium" ForeColor="#999999" BorderWidth="1px"></asp:TextBox>
<asp:TextBox ID="TSifre" runat="server" TextMode="password" Height="27px"
style="text-align: left" BorderColor="Silver" BorderStyle="Solid"
Font-Size="Medium" ForeColor="Gray" BorderWidth="1px">
<asp:Button ID="BGiris" runat="server" cssclass="SBGiris" Text="Giriş"
onclick="BGiris_Click" xmlns:asp="#unknown" />
</form>
</body>
main.aspx.cs
protected void BGiris_Click(object sender, EventArgs e)
{
string kullanici = TKullanici.Text;
string sifre = TSifre.Text;
bool kontrol=false;
if(kullanici == "bill"&&sifre == "123")
{
Response.Redirect("Kullanici.aspx");
}
}
Kullanici.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = Request.Form["TKullanici"];
Label1.Text += Request.Form["TSifre"];
}
My Problem =
I want to use post method. And I want to operate first function in main.aspx.cs BGiris_Click when clicked BGiris Button.If data is true, page go to Kullanici.aspx. And Later Kullanici.aspx.cs will take data with post method. What can I do? I need some help.