PreviousPageType problem

magmo

Member
Joined
Oct 19, 2006
Messages
14
Programming Experience
1-3
Hi

I have some trouble accessing public properties from page1.aspx on page2.aspx. On page1.aspx I have declared a string like this "Public sLine1Value As String = sLine5.Text" and on page2.aspx I have

HTML:
<%@ PreviousPageType VirtualPath="~/page1.aspx" %>
Response.Write(PreviousPage.sLine1Value)

On page1.aspx I have a iframe and when I click a button on that page the iframe attributes is changed like this..

HTML:
MyiFrame.Attributes("src") = ("page2.aspx")


But when I try to access the sLine1Value from page1.aspx I get this error...

Object reference not set to an instance of an object.

on the response.write part


Am I doing things wrong or is this maybe not possible? Maybe I should do it some other way, anyway I could use some advice here....



Best Regards
 
Back
Top