?
Solved

Have to click twice for validator to popup

Posted on 2010-08-31
1
Medium Priority
?
423 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 8

Accepted Solution

by:
TheMozz earned 2000 total points
ID: 33573474
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

743 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