locked
Ajax validation callout not work RRS feed

  • Question

  • Extender control 't1' cannot extend 'txtSun'. Extender controls of type 'AjaxControlToolkit.ValidatorCalloutExtender' cannot extend controls of type 'System.Web.UI.WebControls.TextBox'.
     <ajaxToolkit:UpdatePanel runat="server">
                        <ContentTemplate>
                         <asp:TextBox ID="txtSun" runat="server" Width="30px"  onkeyup="javascript:KeyUpEvent1() "
                                MaxLength="2"></asp:TextBox>
                            <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="t1" TargetControlID="txtSun"
                                Width="350px" HighlightCssClass="highlight" WarningIconImageUrl="~/images/del3.jpg"
                                CloseImageUrl="~/images/close.gif" />
                           
                        </ContentTemplate>
                    </ajaxToolkit:UpdatePanel>
    
    


    Mark the thread as answered if the answer helps you. This helps others who have the same problem !
    Monday, July 6, 2009 4:55 AM

Answers

  • Hi Himanshu,

    Please post asp.net questions to www.asp.net/forums. You would get a better response there.

    Also, A validator callout extender extends the functionality of a validator, not of a textbox. So you need to add a new validator and point the ValidatorCalloutExtender to it using the TargetControlId property.

    I dont think it can directly extend a textbox

    <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="t1" TargetControlID="<Use a Validator's ID here>"
                                Width="350px" HighlightCssClass="highlight" WarningIconImageUrl="~/images/del3.jpg"
                                CloseImageUrl="~/images/close.gif" />
    

    Ganesh Ranganathan
    [Please mark the post as answer if it answers your question]
    Monday, July 6, 2009 6:11 AM
  • Yes i Do agree with Ganesh The  ajaxToolkit:ValidatorCalloutExtender  doesnot directly extentds the textbox. its just an added feature for the other validators.

    Thanks and Regards
    Meetu Choudhary
    MCPD
    Monday, July 6, 2009 6:29 AM

All replies

  • Hi Himanshu,

    Please post asp.net questions to www.asp.net/forums. You would get a better response there.

    Also, A validator callout extender extends the functionality of a validator, not of a textbox. So you need to add a new validator and point the ValidatorCalloutExtender to it using the TargetControlId property.

    I dont think it can directly extend a textbox

    <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="t1" TargetControlID="<Use a Validator's ID here>"
                                Width="350px" HighlightCssClass="highlight" WarningIconImageUrl="~/images/del3.jpg"
                                CloseImageUrl="~/images/close.gif" />
    

    Ganesh Ranganathan
    [Please mark the post as answer if it answers your question]
    Monday, July 6, 2009 6:11 AM
  • Yes i Do agree with Ganesh The  ajaxToolkit:ValidatorCalloutExtender  doesnot directly extentds the textbox. its just an added feature for the other validators.

    Thanks and Regards
    Meetu Choudhary
    MCPD
    Monday, July 6, 2009 6:29 AM
  • means i have to take           rfv + ValidatorCalloutExtender for each single control

    both show err on same time

    by the way
     i want to click other link on same page
    say "Logout" the link is not clicking unless

    i cleared all validations

    How can i redirect  other page w/o clearing calidation ?

    i think in web.config i have to write <custom val...i="off"> somting like this
    but it is not working

    Mark the thread as answered if the answer helps you. This helps others who have the same problem !
    Monday, July 6, 2009 6:40 AM
  • I dont have ACT installed on my work system so cant try it out. If you want, I will go home and give it a try. But  I think you can try setting the Client Side validation of your original validator to false. So that it will fire only at the server side, while your validatorextender will give you eye candy on your client side. I havent tired this. But it should work.

    If the logout button is an Server side control, try setting the causes validation property of the button to false.
    Ganesh Ranganathan
    [Please mark the post as answer if it answers your question]
    Monday, July 6, 2009 6:55 AM
  • Himanshu I am not able to understand your problem if the problem is to make your logout link clickable without validating the page then use vlaidate gropus.
    and on the link  set CausesValidation="False"

    for Eg:

    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" OnClick="LinkButton1_Click">LinkButton</asp:LinkButton><br />


    Thanks and Regards
    Meetu Choudhary
    MCPD
    Monday, July 6, 2009 7:42 AM