AJAX Toolkit provides a variety of controls and extenders.
In this blog I would discuss use of Watermarkextender to
In this blog I would discuss use of Watermarkextender to
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"%>
- <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
- <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </cc1:ToolkitScriptManager>
- <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br />
- <cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" TargetControlID="TextBox2" WatermarkText="Enter username here" runat="server">
- </cc1:TextBoxWatermarkExtender>
It has two important properties "TargetControlID" and "WatermarkText"
TargetControlID: tells to which control this extender is attached.WatermarkText: tells the text which would be displayed in target control attached with TextBoxWatermarkExtender.
Note When you are using ajax toolkit controls always use ToolkitScriptManager instead of ScriptManager.
This is best one article so far I have read online. I would like to appreciate you for making it very simple and easy. I have found another nice post related to this post over the internet which also explained very well. For more details about that post check this url.....
ReplyDeletehttp://mindstick.com/Articles/263a6d0b-7988-4dc2-b041-4883356815e9/?Ajax%20Toolkit%20TextBoxWatermarkExtender%20Control%20in%20ASP.Net
Thanks