Click here to Skip to main content
15,911,789 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: It's been a long time and need some help... Pin
Ron Nicholson1-Oct-10 5:43
professionalRon Nicholson1-Oct-10 5:43 
GeneralRe: It's been a long time and need some help... Pin
MacRaider41-Oct-10 6:18
MacRaider41-Oct-10 6:18 
NewsGot something running! Pin
MacRaider45-Oct-10 3:06
MacRaider45-Oct-10 3:06 
QuestionConnecting Sql Server Pin
vijaylumar29-Sep-10 19:46
vijaylumar29-Sep-10 19:46 
AnswerRe: Connecting Sql Server Pin
SeMartens29-Sep-10 20:57
SeMartens29-Sep-10 20:57 
GeneralRe: Connecting Sql Server Pin
vijaylumar29-Sep-10 21:17
vijaylumar29-Sep-10 21:17 
GeneralRe: Connecting Sql Server Pin
SeMartens29-Sep-10 21:23
SeMartens29-Sep-10 21:23 
GeneralRe: Connecting Sql Server Pin
vijaylumar29-Sep-10 22:01
vijaylumar29-Sep-10 22:01 
GeneralRe: Connecting Sql Server Pin
SeMartens29-Sep-10 22:18
SeMartens29-Sep-10 22:18 
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 

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.