Showing posts with label field. Show all posts
Showing posts with label field. Show all posts

Saturday, March 24, 2012

UpdatePanel and ASP.NET validation controls

Ok, here's the setup:

-- July version of ATLAS

-- Inside an update panel, we have an asp textbox and a required field validator.

-- Outside the update panel we have an image button.

If you click the image button without entering anything in the text box, you get the client-side validation (which is correct). Then, enter valid data and click on the image button with the mouse (don't tab off the text box first). The validator message is cleared, but the the button's click event is never fired. We always have to click it a second time.

We only have this problem in an update panel. Our workaround is to put client-script on the OnMouseDown event of the button to fire the click event. Does anyone know what may be causing this?

Thanks, --David

Turns out it's not an ATLAS problem at all. The validation controls are set to display="dynamic" and they were pushing the image button down (and pulling it back up) and the onmouseup event wasn't completing on the button. Who knew.

Wednesday, March 21, 2012

UpdatePanel and PopupControl inside InsertItemTemplate

Is it posible to use an UpdatePanel with a PopupControlExtender inside a InsertItemTemplate from a DetailsView ?

I want to insert a DateTime field and I want to use a Calendar and a TextBox.

After I insert an UpdatePanel inside an InsertItemTemplate I get an error in design mode "There was an error rendering the control. Object reference not set to an instance of an object."

If you can reproduce this problem following only the steps above on a new page ("After I insert an UpdatePanel inside an InsertItemTemplate I get an error..."), then the Toolkit probably isn't involved and you might consider posting to one of the other Atlas forums?