PostBackURL with master page causes Object reference not set error
- From: Fresh_Air_Rider@xxxxxxxxxxx
- Date: 18 Jan 2007 13:28:45 -0800
Hi
I have two pages which both use the same master page.
Page one contains an asp:textbox control and an asp:button control with
it's PostBackUrl property set to the second page.
The "code behind" of the receiving page contains the following page
which results in "Object reference not set..."
Dim txtTest As TextBox =
CType(Page.PreviousPage.FindControl("txtTest"), TextBox)
Response.Write(txtTest.Text)
I have tried adding "PreviousPageType" and "Reference" directive tags
to the receiving page and all result in the same error message.
This is extremely frustrating and if anyone could suggest what I might
be doing wrong then I'd be very grateful.
I haven't managed to find any "PostBackUrl" examples that use master
pages.
Thanks in anticipation
David
.
- Prev by Date: GDI+ using setResolution always results in resolution of 96x96
- Next by Date: Re: only one usage of each socket address is normally permitted?
- Previous by thread: GDI+ using setResolution always results in resolution of 96x96
- Next by thread: Preserving Focus on a Control in a TabControl in VB.NET
- Index(es):