Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-09-05
8
Medium Priority
?
817 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
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

972 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