'System.Web.UI.WebControls.TextBox' does not contain a definition for 'Substring'

Joined
Apr 7, 2009
Messages
1
Reaction score
0
Hello,

I am a learner web developer with Microsoft Visual Web Developer 2005 using C#. Actually I am trying to extract a part of a string by using the Substring function but it seems not to work for me and compiler returned the following error:

'System.Web.UI.WebControls.TextBox' does not contain a definition for 'Substring'

I need any help to solve this issue please.

Anako
 
Joined
May 16, 2006
Messages
27
Reaction score
0
You must be applying substring on textbox control,

use Text property to get the text entered in textbox.

for e.g.

TextBox1.Text.SubString(0,5);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top