Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > passing text from one frame/page to another

Reply
Thread Tools

passing text from one frame/page to another

 
 
Timmins
Guest
Posts: n/a
 
      06-12-2004
I have a date in a frame/page that i want to pass to another page. I can succefully pass a static value, i just can't pass a value from a text box.

I tried to make everything public. I believe that Me. may only refer to the page that is orginating the action. But how do I pass the text box. Can we assume since I can pass the static value, that the issue is how I grab the textbox value

the Error i get is
Object reference not set to an instance of an object

Here's the Property that is giving me trouble:

Protected WithEvents MsgLbl As System.Web.UI.WebControls.Label
Public WithEvents ToDate As System.Web.UI.WebControls.TextBox
Public WithEvents FromDate As System.Web.UI.WebControls.TextBox
Public DatePublicVar As String

Public ReadOnly Property FromDateTxt() As String
Get
'DatePublicVar = "12/12/2004" ' This Works
DatePublicVar = Me.FromDate.Text 'this doesn't
Return DatePublicVar
End Get

End Property

Thanks, I'm an old vb guy who still hasn't found out how to do some obvious tasks
 
Reply With Quote
 
 
 
 
Slim
Guest
Posts: n/a
 
      06-12-2004

"Timmins" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have a date in a frame/page that i want to pass to another page. I can

succefully pass a static value, i just can't pass a value from a text box.
>
> I tried to make everything public. I believe that Me. may only refer to

the page that is orginating the action. But how do I pass the text box. Can
we assume since I can pass the static value, that the issue is how I grab
the textbox value
>
> the Error i get is
> Object reference not set to an instance of an object
>
> Here's the Property that is giving me trouble:
>
> Protected WithEvents MsgLbl As System.Web.UI.WebControls.Label
> Public WithEvents ToDate As System.Web.UI.WebControls.TextBox
> Public WithEvents FromDate As System.Web.UI.WebControls.TextBox
> Public DatePublicVar As String
>
> Public ReadOnly Property FromDateTxt() As String
> Get
> 'DatePublicVar = "12/12/2004" ' This Works
> DatePublicVar = Me.FromDate.Text 'this doesn't
> Return DatePublicVar
> End Get
>
> End Property
>



unless your form is called "me" no this wont work

if your text box in in a form
form1.texbox1.value

if not its
texbox1.value





> Thanks, I'm an old vb guy who still hasn't found out how to do some

obvious tasks


 
Reply With Quote
 
 
 
 
Bob Lehmann
Guest
Posts: n/a
 
      06-12-2004
Your control, FromDate, is probably out of scope.

You should ask this question a DotNet group.

Bob Lehmann

"Timmins" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have a date in a frame/page that i want to pass to another page. I can

succefully pass a static value, i just can't pass a value from a text box.
>
> I tried to make everything public. I believe that Me. may only refer to

the page that is orginating the action. But how do I pass the text box. Can
we assume since I can pass the static value, that the issue is how I grab
the textbox value
>
> the Error i get is
> Object reference not set to an instance of an object
>
> Here's the Property that is giving me trouble:
>
> Protected WithEvents MsgLbl As System.Web.UI.WebControls.Label
> Public WithEvents ToDate As System.Web.UI.WebControls.TextBox
> Public WithEvents FromDate As System.Web.UI.WebControls.TextBox
> Public DatePublicVar As String
>
> Public ReadOnly Property FromDateTxt() As String
> Get
> 'DatePublicVar = "12/12/2004" ' This Works
> DatePublicVar = Me.FromDate.Text 'this doesn't
> Return DatePublicVar
> End Get
>
> End Property
>
> Thanks, I'm an old vb guy who still hasn't found out how to do some

obvious tasks


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using One XSLT and multiple XML Problem (One is XML and another one is XBRL) loveNUNO XML 2 11-20-2003 06:47 AM
Passing Variables from One Perlscript to Another Joe Perl 1 09-30-2003 11:03 PM
Re: And Another: Passing variables from one page to the next. Steve C. Orr, MCSD ASP .Net 0 08-08-2003 08:33 PM
passing data from one page to another Brian Smith ASP .Net 3 07-15-2003 08:02 PM
Passing value from one script on one page to another script on another page. Robert Cohen ASP General 3 07-15-2003 01:46 PM



Advertisments