Validation controls and UpdatePanel

Discussion in 'ASP .Net Web Controls' started by J055, Aug 12, 2009.

  1. J055

    J055 Guest

    Hi

    I have a number of problems using validation controls within an UpdatePanel.
    I'm using the latest framework. I have a ListView control with some text
    boxes and validators and a ValidationSummary control all within the
    UpdatePanel.

    1. When I use an insert command the first time the validator and
    ValidationSummary work as expected. When I click another button and then
    try to insert again, the validators don't display. Works ok with
    EnablePartialRendering="false".

    2. When I delete a row in the ListView and then click another linkbutton I
    get a null object error in the client script. The control object is null:

    function ValidatorGetValue(id) {
    var control;
    control = document.getElementById(id);
    if (typeof(control.value) == "string") {
    return control.value;
    }
    return ValidatorGetValueRecursive(control);
    }

    What do I need to do to allow these validators to work correctly when used
    inside an UpdatePanel?

    Many thanks
    Andrew
    J055, Aug 12, 2009
    #1
    1. Advertising

  2. Hi Andrew,

    >I have a number of problems using validation controls within an

    UpdatePanel.
    >I'm using the latest framework. I have a ListView control with some text
    >boxes and validators and a ValidationSummary control all within the
    >UpdatePanel.


    I'm willing to assist on this issue. But first, I think I need a demo
    project that can reproduce this issue. Could you send it to me? Then I can
    do some tesets on my side for troubleshoting. To make it as simple as
    possible, I suggest you create a new project that doesn't interact with
    database. Then add code logic until the problem occurs.

    My email is . Please update here after sending the
    project in case I missed that email.

    Regards,
    Allen Chen
    Microsoft Online Support

    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .

    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

    Note: MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 2 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions. Issues of this
    nature are best handled working with a dedicated Microsoft Support Engineer
    by contacting Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
    ==================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Allen Chen [MSFT], Aug 13, 2009
    #2
    1. Advertising

  3. J055

    J055 Guest

    Hi Allen

    I started creating a new project yesterday but couldn't reproduce the
    problem. I eventually found that the original project's web.config file had
    an empty compilation segment, i.e. no

    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35"/>

    entry which I believe is where the ajax friendly validation controls are.

    Anyway, the project seems to work as expected now.

    Thanks
    Andrew
    J055, Aug 14, 2009
    #3
  4. Hi Andrew,

    >I started creating a new project yesterday but couldn't reproduce the
    >problem. I eventually found that the original project's web.config file

    had
    >an empty compilation segment, i.e. no


    ><add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    >PublicKeyToken=31BF3856AD364E35"/>


    >entry which I believe is where the ajax friendly validation controls are.


    >Anyway, the project seems to work as expected now.


    Glad to know you've resolved this issue on your own. Creating a new project
    is always a good option to troubleshoot. We're likely to find out the
    culprit by comparing two projects.

    Thank you for using our Newsgroup Support Service!

    Regards,
    Allen Chen
    Microsoft Online Community Support

    =================================================
    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .
    =================================================
    Allen Chen [MSFT], Aug 14, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    479
    Rob Meade
    Aug 8, 2007
  2. Ronald S. Cook
    Replies:
    0
    Views:
    760
    Ronald S. Cook
    Jan 23, 2008
  3. Nathan Sokalski
    Replies:
    1
    Views:
    586
    miher
    Jun 15, 2009
  4. DavidC

    UpdatePanel and controls

    DavidC, Apr 1, 2010, in forum: ASP .Net
    Replies:
    1
    Views:
    586
    James VanDyne
    Apr 2, 2010
  5. Fabien Henriet

    Custom controls and UpdatePanel

    Fabien Henriet, Jan 12, 2008, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    763
    Fabien Henriet
    Jan 12, 2008
Loading...

Share This Page