There are many ways to transfer information from one page to another Session,Query STring & cross Page posting. hi,first of all friends tell me that How we know that where to use query string to pass information,use cross page posting to pass information.
When we use Cross page Posting
Label2.Text = "Password:" + CType(PreviousPage.FindControl("TextBox12"), TextBox).Text;
ABove code is in VB,help me in converting to C#.
|
| Author: Anuraj 03 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
Querystrings normally used in scenarios where the information is less secure.
Thanks Anuraj THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS. BEWARE OF BUGS IN THE ABOVE CODE; I HAVE ONLY PROVED IT CORRECT, NOT TRIED IT. dotnetthoghts
|
| Author: Gopal Singh Rathore 03 Nov 2009 | Member Level: Silver | Rating:  Points: 2 |
Hello,
Below is given solution for you ... need to manipulate it according to your program.
if (Page.PreviousPage != null && Page.PreviousPage.FindControl("lblAddress") != null) { lblAddress.Text = ((Label)Page.PreviousPage.FindControl("lblAddress")).Text; lblPrice.Text = ((Label)Page.PreviousPage.FindControl("lblPrice")).Text; }
|
| Author: greeny_1984 03 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
Hi,
You can convert it into c# as
label1.text="Password:" + ((textbox)PreviousPage.FindControl("TextBox12")).Text;
Regards, Greeny_1984
Rate this Response[Excellent/Good/Poor] FRESHERS check this link Need help from me join here
|