Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

UpdatePanel and Required field validator: shows error even though field filled?

Posted on 2011-09-05
8
Medium Priority
?
809 Views
Last Modified: 2012-05-12
This should be simple, but I am getting nowhere!

I have a simple form.  When I fill it in, the required field validator displays an error even though the field in question has a value in it.

Also, I am using an open source component (http://sourceforge.net/projects/html5asp/files/) that extends the basic field types with HTML5 features.  The telephone number field in my form uses the PhoneInput control, and when the page posts back this control loses its value, as does the two email fields.

If I remove the UpdatePanel, the validation works.

What am I not spotting??!

Thanks!
0
Comment
Question by:Hairbrush
[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
  • 3
8 Comments
 
LVL 22

Expert Comment

by:plusone3055
ID: 36484867
need the update panel and content template outside the form


    </form>
</ContentTemplate>
    </asp:UpdatePanel>
0
 
LVL 12

Author Comment

by:Hairbrush
ID: 36484901
That doesn't sound right to me?

If I try that, I get:

Control 'UpdatePanel1' of type 'UpdatePanel' must be placed inside a form tag with runat=server
0
 
LVL 14

Expert Comment

by:shahprabal
ID: 36524954
Are you able to turn on enable viewstate on the custom control ? Maybe try using the update panel with a regular textbox and see if the that works. If it does then that narrows it down to the third party control. Is there any code that clears the phone input box? maybe put a breakpoint and check when/how many times its called. Also please attach the source code if you can.

Also, you probably are using the latest version of the toolkit but you may want to double check that :
http://ajaxcontroltoolkit.codeplex.com/ since their latest version was released in july.
0
 
LVL 12

Accepted Solution

by:
Hairbrush earned 0 total points
ID: 37206528
This turned out to be because of a bug in the AJAX control toolkit.  If using HTML5 input controls in conjunction with the toolkit and an update panel, the javascript that performs the validation doesn't work.  See http://ajaxcontroltoolkit.codeplex.com/workitem/27041
0
 
LVL 12

Author Closing Comment

by:Hairbrush
ID: 37233364
Solved the problem myself.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

704 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