How cross page posting is done in Asp.net 2.0?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / yogesh sharma
Like IsPostBack property there is IsCrossPostBack property
that sets to true if page is redirected from a page.
| Is This Answer Correct ? | 0 Yes | 6 No |
Suppose you want an asp.net function (client side) executed on the mouseover event of a button. Where do you add an event handler?
Why is global asax is used for?
How many types of sessions in asp.net?
What is tracing? Where is it used?
What is application variable?
Different type of validation controls in asp.net ?
1 Answers CTS, Keane India Ltd,
What is query string in asp.net?
what is the dllhell? why we use the dllhell?
can we transfer data from one page to another page using viewstate if so how?if not y?
37 Answers AppShark, DataSync, Gtech, iGate, Wipro,
What is the difference between ASP Session State and ASP.Net Session State?
version information of assembly consist of _________ values.
Hi, I am working in a small software company in asp.net platform. I need to know how and what are all the task in asp.net will be assigned for the developers in mnc companies. Thanks in advance.
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)