Solved

Have to click twice for validator to popup

Posted on 2010-08-31
1
420 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 500 total points
ID: 33573474
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

695 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