Menu icon Foundation
ASP.Net & Reveal, no value in controls on postback

This isn't a request for information, I just wanted to put a work around to a problem I had.

I had a setup where a reveal modal was opening with a couple of text boxes and a asp:LinkButton, the link button wasn't calling an ajax based postback, just a standard postback.

When the postback was performed the values in the text boxes were not being posted back.

After much testing I realised the data in the text boxes would be available once the Reveal Modal pop up was closed.

So to work around this I have called __doPostBack after the reveal window has closed.

asp.netrevealmodalsubmit formno data

This isn't a request for information, I just wanted to put a work around to a problem I had.

I had a setup where a reveal modal was opening with a couple of text boxes and a asp:LinkButton, the link button wasn't calling an ajax based postback, just a standard postback.

When the postback was performed the values in the text boxes were not being posted back.

After much testing I realised the data in the text boxes would be available once the Reveal Modal pop up was closed.

So to work around this I have called __doPostBack after the reveal window has closed.

Steve Trask almost 6 years ago

Good to know, thanks

Pablo Apanasionek almost 6 years ago

Have you used Abide Validation inside a Reveal Modal in ASP.NET?

Abide fires only when inside a tag and the modal is moved outside the tag when opened.

Luca Orsini over 5 years ago

The problem is that the Reveal Modal is move outside the form tag, so all the controls inside it losts the postback values.

To prevent this you have to insert this code to move the reveal modal container inside the form tag:

$(document).on('opened', '[data-reveal]', function () {
$(this).appendTo($("form"));
});