I am trying to add a TextBoxWatermarkExtender control into my ASP.NET 3.5 web application. I followed the tutorial Microsoft supplies here http://www.asp.net/learn/Ajax-Control-Toolkit/tutorial-47-cs.aspx and then I added in the control I wanted. My code looks like this:
<asp:TextBox ID="txtEmailAddress" runat="server" Width="130px"></asp:TextBox>
<cc1:TextBoxWatermarkExtender ID="tbweEmailAddtess" runat="server" TargetControlID="txtEmailAddress" WatermarkText="Email Address">
</cc1:TextBoxWatermarkExtender>
I also added in <asp:ScriptManager ID="smScripts" runat="server" />
as the first tag after my <form>
tag.
The code compiles and does not throw any errors that cause the page to not load. I do receive a number of JavaScript errors on the page though.
So after some more research and looking at this errors this is what I found. If I remove the textextender but keep <asp:ScriptManager ID="smScripts" runat="server" />
inside of my on the page I still receive errors. They are:
This one is in the page:
//<![CDATA[
Sys.Application.initialize();
//]]>
This one is in scriptresource.axd and I receive it 2 times.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Also, I am using URL Rewriting but this is my default.aspx page so I don't know if that plays into it at all.