Welcome Guest Search | Active Topics | Sign In | Register

Callback Panel and Validation Controls Options
Loren Dorez
Posted: Wednesday, January 21, 2009 12:39:39 PM
Rank: Advanced Member
Groups: Member

Joined: 1/9/2009
Posts: 97
OK im using a CallbackPanel with 3 divs to form a custom Wizard walkthrough

The first DIV shows a welsome screen and when the user click starts the callback panel handles the Postback which hides the first DIV and shows the second DIV

The Second DIV is a TOS and when the user clicks continue the Callback panel haddles the postback and then hides the second DIV loads some dynamic Drop downs and then shows the 3rd DIV

The Third DIV has a form the user fills out and clicks a finish button whicvh DOES a FULL POSTBACK and is not a trigger on the Callback since it does a redirect the problem is that it attaempts to execute the 3 DIV Button code and not kick start the form validation. Examples

I have a text box thats require i have a req validator but it doesnt kick start when finish is clicked inside the callback panel.. Can some please help
eo_support
Posted: Wednesday, January 21, 2009 3:31:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Try to place a CustomValidator outside of the CallbackPanel. You do not need to do anything else on this CustomValidator except for placing it in the form. The following code demonstrates a working example:

Code: HTML/ASPX
<eo:CallbackPanel runat="server" 
    id="CallbackPanel1" Triggers="{ControlID:Button1;Parameter:}">
    <asp:Button runat="server" ID="Button1" 
        OnClick="Button1_Click" Text="Button1" />
    <asp:Panel runat="server" ID="Panel1" Visible="False">
        <asp:TextBox runat="server" ID="TextBox1"></asp:TextBox>
        <asp:RequiredFieldValidator runat="server" 
            ID="RequiredFieldValidator1" ControlToValidate="TextBox1" 
            ErrorMessage="test"></asp:RequiredFieldValidator>
        <asp:Button runat="server" ID="Button2" Text="Button2" />
    </asp:Panel>
</eo:CallbackPanel>
<asp:CustomValidator ID="CustomValidator1" runat="server" 
    ErrorMessage="CustomValidator"></asp:CustomValidator>


Code: C#
protected void Button1_Click(object sender, EventArgs e)
{
    Panel1.Visible = true;
}


This should solve the problem for you.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.