Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How cross page posting is done in Asp.net 2.0?

Answer Posted / abhishek kumar

cros page posting is page to page data transfer machanism
like query string.

you can do it two ways :

1. using <%@ PreviousPageType VirtualPath="~/
SourcePage.aspx" %> directive :- If the target page
contains a PreviousPageType directive that points to the
source page, you can access the source page's CurrentCity
property using code such as the following.

Label1.Text = PreviousPage.CurrentCity;

2. Using PostBackUrl and PreviousPage property :-

In source page specify PostBAckUrl property to control
which you use to generate postback like,

<asp:Button
ID="Button1"
PostBackUrl="~/TargetPage.aspx"
runat="server"
Text="Submit" />

In TargetPage.aspx :-

if (Page.PreviousPage != null)
{
TextBox SourceTextBox =
(TextBox)Page.PreviousPage.FindControl("TextBox1");
if (SourceTextBox != null)
{
Label1.Text = SourceTextBox.Text;
}
}

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the advantage of using Windows authentication in a Web application?

1060


What is enableviewstate?

914


Is asp net front end or backend?

970


Can a .net web application consume java web service?

914


Explain the steps needed to be performed in order to create an animation in xaml?

977


What are the properties of the eventargs argument when capturing keyboard events?

1032


What is meant by server side scripting?

903


How do you do client-side validation in .net? How to disable validator control by client side javascript?

969


How can u deifne the benefits and limitation of using Viewstate for state management?

1100


what is command line compiler.what are the steps and how it is related to debugging.

1846


Why the javascript validation not run on the asp.net button but run successfully on the html button?

916


What is the typical session identifier?

990


What are validators and list some validators of asp.net?

936


What is repository pattern in mvc.net? : asp.net mvc

959


How do cookies work? Give an example of their abuse.

944