HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0AJAX ValidatorCallout problems...AJAX ValidatorCallout problems...
Previous
 
Next
New Post
8/2/2007 11:51 PM
 

Has anyone been able to get the AJAX ValidatorCallout to work in DNN? I’ve followed the directions in some of the guides by AdefWebserver and hooligannes 2.0. And I have successfully gotten the calendar extender and AdefWebserver toolkit example to work, but I can seem to get the ValidatorCallout to work. My suspicion is that it has something to do with the update panel. I remember reading somewhere that you CANNOT place the ValidatorCallout in an update panel. If I’m not mistaken isn’t the entire DotNetNuke site one big update panel? I’m so lost any help would be appreciated.

 

Thanks, Nathan Rover

 
New Post
8/3/2007 7:33 PM
 

Here is what I’m testing with, I have the AJAX toolkit test module from AdefWebserver, then I just copied the example from the AJAX toolkit project for the ValidatorCallout. the AJAX from AdefWebservers part works fine, and when I leave the fields blank and hit submit it does the post back and displays “Thanks , we'll give you a call at .” and if I fill in the fields it will show the values entered in the fields. However it doesn’t check the phone number field to see if it’s actually a phone number. Here are my code files.

 
First the ASCX

 
<%@ Control Language="VB" Inherits="BRAssociates.Modules.AJAXTest.View" CodeFile="BRAssociates.AJAXTest.View.ascx.vb" AutoEventWireup="true" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<style>

.PanelExtender

{

    position: relative;

}

</style>

 

<br />

<table>

    <tr>

        <td nowrap="noWrap" valign="top">

            <strong>

                <asp:Panel ID="pnlUsers" runat="server" Height="50px" Width="125px" CssClass="PanelExtender">

                    <Strong>Enter User:</Strong>

                    <asp:TextBox ID="MessageTextBox" runat="server" Width="200" AutoCompleteType="Disabled" />

                    <asp:Button ID="btnUser" runat="server" Text="Select User" />

                    <asp:UpdatePanel ID="UpdatePanel2" runat="server">

                        <ContentTemplate>

                            <asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged"

                                Style="border: 1px outset white; width: 200px" BackColor="white">

                                <asp:ListItem Text="Shaun Walker" />

                                <asp:ListItem Text="Joe Brinkman" />

                                <asp:ListItem Text="Nik Kalyani" />

                                <asp:ListItem Text="Scott Willhite" />

                                <asp:ListItem Text="Cancel" Value="" />

                            </asp:RadioButtonList>

                        </ContentTemplate>

                    </asp:UpdatePanel>

                    <ajaxToolkit:PopupControlExtender ID="PopupControlExtender2" runat="server" TargetControlID="MessageTextBox"

                        PopupControlID="UpdatePanel2" CommitProperty="value" Position="Bottom" CommitScript="e.value;" />

                </asp:Panel>

                <br />

            </strong>

        </td>

    </tr>

    <tr>  

        <td nowrap="noWrap" valign="top">

            <asp:UpdatePanel ID="UpdatePanel1" runat="server">

                <ContentTemplate>

                    <strong>Selected:</strong>

                    <asp:Label ID="lblSelectedUser" runat="server"></asp:Label>

                </ContentTemplate>

                <Triggers>

                    <asp:AsyncPostBackTrigger ControlID="btnUser" EventName="Click" />

                </Triggers>

            </asp:UpdatePanel>

        </td>

    </tr>

</table>

<br />

<br />

    <div class="demoarea">

        <div class="demoheading">ValidatorCallout Demonstration</div>

        <table>

            <tr>

                <td>Name:</td>

                <td><asp:TextBox runat="server" ID="NameTextBox"

                    BorderStyle="solid" BorderWidth="1px" BorderColor="#a9a9a9" /></td>

            </tr>

            <tr>

                <td>Phone Number:</td>

                <td><asp:TextBox runat="server" ID="PhoneNumberTextBox"

                    BorderStyle="solid" BorderWidth="1px" BorderColor="#a9a9a9" /></td>

            </tr>

        </table>

        <br />

       

        <asp:RequiredFieldValidator runat="server" ID="NReq"

            ControlToValidate="NameTextBox"

            Display="None"

            ErrorMessage="<b>Required Field Missing</b><br />A name is required." />

        <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="NReqE"

            TargetControlID="NReq"

            HighlightCssClass="validatorCalloutHighlight" />

           

        <asp:RequiredFieldValidator runat="server" ID="PNReq"

            ControlToValidate="PhoneNumberTextBox"

            Display="None"

            ErrorMessage="<b>Required Field Missing</b><br />A phone number is required.<div style='margin-top:5px;padding:5px;border:1px solid #e9e9e9;background-color:white;'><b>Other Options:</b><br /><a href=' ll give you a call at {1}.", NameTextBox.Text, PhoneNumberTextBox.Text)

        End Sub

 

    End Class

End Namespace

Any thoughts or suggestions would be appreciated.

Thanks, Nathan Rover

 
New Post
8/6/2007 5:30 PM
 

bump.

 
New Post
8/13/2007 2:09 AM
 

I'm going on 4 weeks now and I'm still not having any luck with this control. Here is an updated version of my code. I've striped out some of the unnecessary parts any suggestions?

<%@ Control Language="VB" Inherits="BRAssociates.Modules.AJAXTest.View" CodeFile="BRAssociates.AJAXTest.View.ascx.vb" AutoEventWireup="false" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<style>
.PanelExtender
{
    position: relative;
}
</style>

<asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
    <asp:View ID="View1" runat="server">
        <asp:Panel ID="pnl_Form" runat="server">
            <table>
                <tr>
                    <td>Name:</td>
                    <td><asp:TextBox runat="server" ID="NameTextBox"
                        BorderStyle="solid" BorderWidth="1px" BorderColor="#a9a9a9" /></td>
                </tr>
                <tr>
                    <td>Phone Number:</td>
                    <td><asp:TextBox runat="server" ID="PhoneNumberTextBox"
                        BorderStyle="solid" BorderWidth="1px" BorderColor="#a9a9a9" /></td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                </tr>
            </table>
        </asp:Panel>
       
        <asp:LinkButton ID="Button1" runat="server" Text="Submit" />

        <asp:RequiredFieldValidator runat="server" ID="NReq"
            ControlToValidate="NameTextBox"
            Display="none"
            ErrorMessage="<b>Required Field Missing</b><br />A name is required." />
        <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="NReqE"
            TargetControlID="NReq"
            HighlightCssClass="validatorCalloutHighlight" />
           
        <asp:RequiredFieldValidator runat="server" ID="PNReq"
            ControlToValidate="PhoneNumberTextBox"
            Display="none"
            ErrorMessage="<b>Required Field Missing</b><br />A phone number is required." />
        <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="PNReqE"
            TargetControlID="PNReq"
            HighlightCssClass="validatorCalloutHighlight"
            Width="350px" />
           
        <asp:RegularExpressionValidator runat="server" ID="PNRegEx"
            ControlToValidate="PhoneNumberTextBox"
            Display="none"
            ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}"
            ErrorMessage="<b>Invalid Field</b><br />Please enter a phone number in the format:<br />(###) ###-####" />
        <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="PNReqEx"
            TargetControlID="PNRegEx"
            HighlightCssClass="validatorCalloutHighlight" />
        

        <br /><br />

        <asp:Label ID="lblMessage" runat="server" />
    </asp:View>
</asp:MultiView>

Imports DotNetNuke
Imports System.Web.UI
Imports System.Collections.Generic
Imports System.Reflection
Imports DotNetNuke.Entities.Modules

Namespace BRAssociates.Modules.AJAXTest
    Partial Class View
        Inherits Entities.Modules.PortalModuleBase

        Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Try
                If DotNetNuke.Framework.AJAX.IsInstalled Then
                    DotNetNuke.Framework.AJAX.RegisterScriptManager()
                    'DotNetNuke.Framework.AJAX.WrapUpdatePanelControl(pnlTest, True)
                    'DotNetNuke.Framework.AJAX.RegisterPostBackControl(Button1)
                End If
            Catch exc As Exception        'Module failed to load
                ProcessModuleLoadException(Me, exc)
            End Try
        End Sub

        Protected Sub Button1_OnClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
            lblMessage.Text = String.Format("Thanks {0}, we'll give you a call at {1}.", NameTextBox.Text, PhoneNumberTextBox.Text)
        End Sub

    End Class
End Namespace

 

 
New Post
8/14/2007 10:58 AM
 

bump.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0AJAX ValidatorCallout problems...AJAX ValidatorCallout problems...


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Attend A Webinar
Free Demo Site
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

DotNetNuke Scoop!

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates the DotNetNuke Store where users purchase third party apps for the platform.