C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

Cross page Posting


Posted Date: 03 Nov 2009      Posted By: sandeep      Member Level: Bronze     Points: 1   Responses: 3



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#.






Responses

Author: Anuraj    03 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     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 2009Member Level: SilverRating: 2 out of 52 out of 5     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 2009Member Level: DiamondRating: 2 out of 52 out of 5     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



Post Reply
You must Sign In to post a response.
Next : Login Control
Previous : Dropdown in asp.net
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use