TextBox is not declared - error

N

NerdRunner

I have added a textbox to my web form. When I attempt to set the text
of this control (txtSSMaterial.text = "some text") I get the following
error -

error BC30451: Name 'txtSSMaterial' is not declared.

I have many other controls on the same form that do not cause an error
to occur. Could this be due to a control count limitation?

Thanks,

Sean M. Severson
 
G

Guest

NerdRunner,
No, it's not a limitation. When you drag a control onto the designer surface
of a WebForm, the IDE "wires up" the

"Protected ControlType Controltype1"

declaration. Occasionally this doesn't happen, for several reasons. Just
switch to code view and put the declaration in yourself if it is missing.
Peter
 
N

NerdRunner

Peter,

I don't see any declarations in my code behind form. Where would I
enter the Protected ControlType Controltype1 line?

Sean M. Severson
 

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,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top