SET PROPERTY OF A BUTTON
RIGHT CLICK ON BUTTON PROPERTY
|
CLICK HERE TO SELECT YOUR PAGE
·
TO SEND A REQUEST OF A NEW PAGE AND DOING THE
POSTBACK MEANS ALSO SUBMMITING IT’S OWN VALUE
·
IT IS THE ONLY SIGNLE SCENARIO WHICH IS IN
ASP.NET VERSION 2.0, 3.5, AND 4.0 ONLY
PRACTICAL
ON PAGE 1
SET PROPERTY OF A BUTTON
RIGHT CLICK ON BUTTON PROPERTY
|
CLICK HERE TO SELECT YOUR PAGE
ON SECONG PAGE DEFAULT2.ASPX
protected void
Page_Load(object sender, EventArgs e)
{
TextBox
t1 = (TextBox)Page.PreviousPage.FindControl("t1");
TextBox
t1 = (TextBox)Page.PreviousPage.FindControl("t2");
TextBox
t2 = (TextBox)Page.PreviousPage.FindControl("t3");
Response.Write(Convert.ToInt32(t.Text)
+ Convert.ToInt32(t1.Text) + Convert.ToInt32(t2.Text));
}
ADVANTAGES OF CONTEXT HANDLER
1.
SECURE IN THIS CASE
2.
VALUE IS NOT SHOWN IN URL\
3.
YOU CAN WRITE ANY TYPE VALUE LIKE HTML TAGS VALUES WHERE AS
YOU CAN WRITE IT IN QUERY STRING
4.
IT SAFE ROUND TRIPPING
5.
HERE THE VALUE IS TREATED LIKE A VALUE TYPE NOT VARIABLE TYPE
No comments:
Post a Comment