Click here to Skip to main content
15,889,863 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Connecting Sql Server Pin
Gamzun2-Oct-10 1:12
Gamzun2-Oct-10 1:12 
GeneralRe: Connecting Sql Server Pin
vijaylumar2-Oct-10 1:43
vijaylumar2-Oct-10 1:43 
GeneralRe: Connecting Sql Server Pin
Gamzun3-Oct-10 10:20
Gamzun3-Oct-10 10:20 
QuestionInheritance Pin
future383929-Sep-10 4:09
future383929-Sep-10 4:09 
AnswerRe: Inheritance [Longish Post] Pin
Keith Barrow29-Sep-10 21:48
professionalKeith Barrow29-Sep-10 21:48 
GeneralRe: Inheritance [Longish Post] Pin
future383930-Sep-10 4:19
future383930-Sep-10 4:19 
GeneralRe: Inheritance [Longish Post] Pin
Keith Barrow30-Sep-10 9:39
professionalKeith Barrow30-Sep-10 9:39 
QuestionAsp.net Cross Page Post Back issue Pin
AndieDu28-Sep-10 20:44
AndieDu28-Sep-10 20:44 
Dear All,

I have two web pages, say SourceWebPage and TargetWebPage, on the TargetWebpage I have a directive like:
<%@ PreviousPageType VirtualPath = "~/SourceWebPage.aspx" %>

These are the code behand on TargetWebPage Page_Load Event:

if (!Page.IsPostBack)
{
if (Page.PreviousPage != null && Page.PreviousPage.IsCrossPagePostBack)
{
DateTime reportDate = PreviousPage.DTReportDate;
string serialNo = PreviousPage.SerialNo;
}
else
{
LoadReportType();

odsSyncSummaryReport.FilterExpression = GetObjDSFillerExpression();
gvSyncSummaryReport.DataSourceID = "odsSyncSummaryReport";
gvSyncSummaryReport.DataBind();
}
}
else
{
odsSyncSummaryReport.FilterExpression = GetObjDSFillerExpression();
}

there is a link button on SourceWebPage like this: OnClick = "lbSerialNo_Click" PostBackUrl = "~/TargetWebPage.aspx".

Both pages are able to be accessed by click on the menu, when I go to SourceWebPage first and then click the link button, it posts back to the TargetWebPage and everything works fine. But the problem is when i go to the TargetWebPage first, it throws an exception.

I think i know the problem because the PreviousPage property (SourceWebPage) hasn't been loaded yet, therefor there is no way that the TargetWebPage to get the value from SourceWebPage. What i want to know in here is how do I know whether the TargetWebPage is posted from SourceWebPage or it is posted from Menu. This piece of code doesn't help me at all: if (Page.PreviousPage != null &amp;&amp; Page.PreviousPage.IsCrossPagePostBack)

I was googling for hours but without any luck, can someone in here shed me a light?

Thanks
AnswerRe: Asp.net Cross Page Post Back issue Pin
Not Active29-Sep-10 2:43
mentorNot Active29-Sep-10 2:43 
GeneralRe: Asp.net Cross Page Post Back issue Pin
AndieDu29-Sep-10 13:36
AndieDu29-Sep-10 13:36 
QuestionWhich approach is faster ? calculate Image size in Server or Client ? Pin
Nadia Monalisa28-Sep-10 19:40
Nadia Monalisa28-Sep-10 19:40 
AnswerRe: Which approach is faster ? calculate Image size in Server or Client ? Pin
vaghelabhavesh29-Sep-10 18:08
vaghelabhavesh29-Sep-10 18:08 
GeneralRe: Which approach is faster ? calculate Image size in Server or Client ? Pin
Nadia Monalisa29-Sep-10 19:05
Nadia Monalisa29-Sep-10 19:05 
QuestionAsynchronous webmethods Pin
david vermeulen28-Sep-10 19:19
david vermeulen28-Sep-10 19:19 
AnswerRe: Asynchronous webmethods Pin
Not Active29-Sep-10 2:51
mentorNot Active29-Sep-10 2:51 
AnswerRe: Asynchronous webmethods Pin
NeverHeardOfMe29-Sep-10 3:54
NeverHeardOfMe29-Sep-10 3:54 
QuestionPost via email Pin
Jassim Rahma28-Sep-10 12:35
Jassim Rahma28-Sep-10 12:35 
QuestionNavigationURL question Pin
Jassim Rahma28-Sep-10 12:26
Jassim Rahma28-Sep-10 12:26 
AnswerRe: NavigationURL question Pin
Not Active28-Sep-10 13:49
mentorNot Active28-Sep-10 13:49 
QuestionExpires question Pin
Jassim Rahma28-Sep-10 10:46
Jassim Rahma28-Sep-10 10:46 
AnswerRe: Expires question Pin
thatraja28-Nov-10 1:24
professionalthatraja28-Nov-10 1:24 
Questionabout configuration file Pin
Dhyanga28-Sep-10 5:52
Dhyanga28-Sep-10 5:52 
AnswerRe: about configuration file Pin
JHizzle28-Sep-10 6:04
JHizzle28-Sep-10 6:04 
GeneralRe: about configuration file Pin
Dhyanga28-Sep-10 6:08
Dhyanga28-Sep-10 6:08 
GeneralRe: about configuration file Pin
Not Active28-Sep-10 6:19
mentorNot Active28-Sep-10 6:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.