Completely Free .NET word API

Resources » .NET programming » ASP.NET/Web Applications

ASP.NET Ajax Control (TextBoxWatermarkExtender,ValidatorCalloutExtender)

Updated: Category: ASP.NET/Web Applications
Author: Member Level: GoldPoints: 15

article about ASP.NET Ajax Control TextBoxWatermarkExtender,ValidatorCalloutExtender)

Here I demonstrate how to use AJAX Control TextBoxWatermarkExtender and ValidatorCalloutExtender in ASP.NET.

<asp:TextBox ID="txtFname" runat="server"/>
<asp:RequiredFieldValidator ID="rfvFname" runat="server" ErrorMessage="Enter First Name"
ControlToValidate="txtFname" Display="None" ValidationGroup="vgCheck"/>
<ajaxToolkit:TextBoxWatermarkExtender ID="twFname" runat="server" TargetControlID="txtFname"
WatermarkText="Enter First Name"/>
<ajaxToolkit:ValidatorCalloutExtender ID="vcFname" runat="server" TargetControlID="rfvFname"/>
<br />
<asp:Button ID="btnSubmit" runat="server" Text="Submit" ValidationGroup="vgCheck" />

TextBoxWatermarkExtender : This Ajax control attached to Textbox control to get WaterMark behavior. When Textbox control is empty it display Watermark text.To attach TextBoxWatermarkExtender to TextBox set TargetControlId of TextBoxWatermarkExtender to particular TextBox.

Here,I set TargetControlID of twFname to txtFname and set WatermarkText for txtFname.
You can also use Css Class with watermark contol.

ValidatorCalloutExtender : This Ajax control enhances the functionality of existing ASP.NET validators. To use this control, add an input field and a validator control as you normally would. Then add the ValidatorCallout and set its TargetControlID property to reference the validator control.

Here, I use rfvFname RequiredFieldValidator control to validate txtFname TextBox control. To use ValidatorCalloutExtender I set TargetControlID to rfvFname RequiredFieldValidator.

So,both control TextBoxWatermarkExtender,ValidatorCalloutExtender ASP.NET AJAX Control is very easy to understand and use to it.

Did you like this resource? Share it with your friends and show your love!

Responses to "ASP.NET Ajax Control (TextBoxWatermarkExtender,ValidatorCalloutExtender)"

No responses found. Be the first to respond...


Post Comment:

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)

    Type the numbers and letters shown on the left.

    Submit Article     Return to Article Index
    Subscribe to Subscribers
    Active Members
    TodayLast 7 Daysmore...

    Awards & Gifts
    Talk to Webmaster Tony John

    Online Members

    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India