Sample code:
<asp:TextBox ID="UserName" runat="server" textmode="Email" CssClass="loginTextBox loginText marginTop20"></asp:TextBox>
<ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="UserName" WatermarkText="Your email address as username" WatermarkCssClass="watermark" Enabled="True"></ajaxToolkit:TextBoxWatermarkExtender>
Problem:
The textbox "UserName" has CSS classes specified that sets the size of text, font, margin etc. When WatermarkCssClass is specified (watermark - makes the text color gray), the CSS classes specified on the textbox are rendered ineffective. It would have been better if it inherited CSS classes specified on the target control.
One Workaround that worked:
Add all the classes specified on the target control in the extender control as well.
<asp:TextBox ID="UserName" runat="server" textmode="Email" CssClass="loginTextBox loginText marginTop20"></asp:TextBox>
<ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="UserName" WatermarkText="Your email address as username" WatermarkCssClass="watermark" Enabled="True"></ajaxToolkit:TextBoxWatermarkExtender>
Problem:
The textbox "UserName" has CSS classes specified that sets the size of text, font, margin etc. When WatermarkCssClass is specified (watermark - makes the text color gray), the CSS classes specified on the textbox are rendered ineffective. It would have been better if it inherited CSS classes specified on the target control.
One Workaround that worked:
Add all the classes specified on the target control in the extender control as well.