We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

error! text is not a member of string------ how to resolve

hi,

in my app am having 6 text boxes named as txtArea1 to txtArea6... in the code i have to assign the text values of these text boxes to a string variable.

so ive used the following code:
*********************************
Dim area as String
Dim txtbox as string

txtbox= "txtArea" & num
area=txtbox.text
***********************************

am getting the following error msg:

text is not a member of string

how to resolve this.
kindly reply to my query as early as possible

thank u



3 Replies

PJ Poornima Joy Balan Syncfusion Team April 23, 2007 04:21 AM UTC

Hello,

Here is the code of a example. I hope it will help it out.

txtbox = CType(Page.FindControl("txtArea" & num), TextBox).Text

Please let us know if you have any further queries.

Thanks,
Poornima


WR wrkrishna April 23, 2007 06:47 AM UTC

Thanks Poornima thanks a lot for your help.
It didnot work exactly in the way you have specified but it worked this way:

********
Dim txtbox as control
txtbox= FindControl("txt_Area" &num)
area= CType(txtbox,TextBox).Text

***************

your hint helped me

thanks
bye
ravi



SU subashini January 28, 2008 11:22 AM UTC

Hi poornima

I am subazini, on doing postback with VB the webbrowser is not processing I have missed all of urs number plz send ur mobile number to my ID
subabio@yahoo.com

Regards subazini


Loader.
Live Chat Icon For mobile
Up arrow icon