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 a .xap file? Explain with an example.

1021


How to Insert/Add in ASPXgridview

1034


How to integrate angular 8 with asp.net mvc 5? : Asp.Net MVC

890


i have 3+ exp in .net? i am going interview now but they asked me do you know any TOOL? which tool will i study please refer me?

2342


How can you enable impersonation in the web.config file?

1152


What is asp.net futures?

1092


What are the advantages of using sql stored procedures instead of adhoc sql queries in an asp.net web application?

1107


How to create multi language website in asp.net mvc? : Asp.Net MVC

983


How do I send an email message from my ASP.NET page?

958


How to display validation messages in one control?

990


What are the different types of Caching techniques in ASP.NET?

1057


How would you enable impersonation in the web.config file?

999


Explain the different types of directives in .net?

945


What is http request and response?

1020


Explain swagger components.

1005