Click here to Skip to main content
15,890,609 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have a textbox and other controls in my form. The problem is I get a greenline underlining my controls saying "ELEMENT 'Textbox' is not a known element This may occur if there is a compilation error or web.config is missing" But the project is running fine. Where should I look to solve this error?
Posted
Comments
Anuja Pawar Indore 2-Sep-11 10:41am    
Are u using Update Panel?

It's supposed to be TextBox (it's case-sensitive).

EDIT ==================

The green intellisense underline is merely a warning. Try doing this:

<asp:TextBox blah blah ></asp:TextBox>


Sometimes it clears up weird warnings.


Comments:

0) giving a textbox an ID of "DatePicker" is confusing. Change your ID to something more appropriate.

1) Enabled is true by default, you don't need to specify it.

2) Change your CSSClass name to something that *isn't* "textbox". Call it "textboxStyle" or something like that.
 
Share this answer
 
v3
Comments
Anele Ngqandu 2-Sep-11 9:52am    
<asp:TextBox CssClass="textbox" runat="server" ID="DatePicker" AutoPostBack="true" Enabled="true" ontextchanged="DatePicker_TextChanged" />

Thats my textbox sir and still its saying the same thing
#realJSOP 2-Sep-11 10:41am    
See my edited answer.
Just check you may be missing closing of any other tag which is before or after your text box.
 
Share this answer
 
Just check you may be missing form tag action.

like your code is:-

<form>
<asp:textbox id="txtsubscribe" runat="server" type="text" class="text">

</form>

right code:-

<form action="#">
<asp:textbox id="txtsubscribe" runat="server" type="text" class="text">

</form>

greenline problem solve....

thankyou
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900