Solved

Have to click twice for validator to popup

Posted on 2010-08-31
1
411 Views
Last Modified: 2012-05-10

This is a related question. I think I know what's going on but not sure how to fix it.
I have a multiview. On the 9th view, I have a repeater. Inside it, i have radiobuttonlist,a textbox, customvalidator and a requiredfieldvalidtor. I have the requiredfiedvalidator for textbox set to disabled (see related question for the code).

I also have a ValidationSummary for the entire page.

That solution works.  I click "NEXT" in multiview. The onServerValidate is called. RequiredFieldValidator is enabled and I get the RequiredFieldValidator for the textbox enabled. BUT, the ValidationSummary doesnt popup unless i click the NEXT box the second time. I think i need to somehow trigger the ValidationSummary as well but not sure.

I've attached a screenshot of how the page looks. The repeater is in the related question. I have the validationsummary and event for the NEXT button below.
<asp:ValidationSummary ID="ValidationSummary1"
                    ShowMessageBox="true"
                    ShowSummary="false"
                    HeaderText="You must enter a value in the following fields:"
                    DisplayMode="BulletList" 
                    EnableClientScript="true"
                    runat="server"/>  

----------

  protected void btnNext_Click(object sender, EventArgs e)
    {//multiview next button
        if (Page.IsValid)
          mvApplication.ActiveViewIndex++;
    }

Open in new window

Doc2.docx
0
Comment
Question by:Camillia
1 Comment
 
LVL 8

Accepted Solution

by:
TheMozz earned 500 total points
ID: 33573474
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now