Solved

Have to click twice for validator to popup

Posted on 2010-08-31
1
409 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 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

13 Experts available now in Live!

Get 1:1 Help Now