Validation controls and UpdatePanel


J

J055

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
 
Ad

Advertisements

A

Allen Chen [MSFT]

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 (e-mail address removed). 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:
(e-mail address removed).

==================================================
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.
 
J

J055

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
 
Ad

Advertisements

A

Allen Chen [MSFT]

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:
(e-mail address removed).
=================================================
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top