Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Visual Basic EVAL function?


Message #1 by "Alvin Ling" <alvin.ling@i...> on Mon, 11 Feb 2002 10:23:09 -0500
Is there a visual basic equivalent of the Jscript eval() function?



myTextBox = Eval("txtMyTextBox" & "1")



Would return a reference to a txtMyTextBox1









Message #2 by "Shakil Ahmed Siraj" <shakil.siraj@p...> on Tue, 12 Feb 2002 21:59:44 -0800
Hi,



You can try this:



Dim myObject As Object



Set myObject = Me.Controls( "txtMyTextBox" & "1" )



MsgBox myObject.Text



Happy coding!



Best regards, Shakil



-----Original Message-----

From: Alvin Ling [mailto:alvin.ling@i...] 

Sent: Monday, February 11, 2002 7:23 AM

To: ASP+

Subject: [aspx] Visual Basic EVAL function?



Is there a visual basic equivalent of the Jscript eval() function?



myTextBox = Eval("txtMyTextBox" & "1")



Would return a reference to a txtMyTextBox1
















Message #3 by "Alvin Ling" <alvin.ling@i...> on Mon, 11 Feb 2002 14:09:48 -0500
Me.Controls.Item("txtMyTextBox" & "1")



doesn't work because it expects an integer (index) within the

ControlCollection, not a string.  Any other ideas?





Alvin



> -----Original Message-----

> From: Shakil Ahmed Siraj [mailto:shakil.siraj@p...] 

> Sent: Wednesday, February 13, 2002 1:00 AM

> To: ASP+

> Subject: [aspx] RE: Visual Basic EVAL function?

> 

> 

> Hi,

> 

> You can try this:

> 

> Dim myObject As Object

> 

> Set myObject = Me.Controls( "txtMyTextBox" & "1" )

> 

> MsgBox myObject.Text

> 

> Happy coding!

> 

> Best regards, Shakil

> 

> -----Original Message-----

> From: Alvin Ling [mailto:alvin.ling@i...] 

> Sent: Monday, February 11, 2002 7:23 AM

> To: ASP+

> Subject: [aspx] Visual Basic EVAL function?

> 

> Is there a visual basic equivalent of the Jscript eval() function?

> 

> myTextBox = Eval("txtMyTextBox" & "1")

> 

> Would return a reference to a txtMyTextBox1

> 

> 

> 

> 

> 




> 

> 




> 

> 










  Return to Index