Question

I am using a cross page postback for Page A to pass data to Page B.

The button that causes the postback has its postbackurl set but is disabled until the user selects a value from a DDL at which point the button is enable using javascript. However this prevents the cross page postback from occurring, Page A just postbacks to itself.

If the button is never disabled it works fine. Anyone know how to solve this?

Was it helpful?

Solution

It looks like when the button is disabled .Net doesn't bother adding the necessary bits to handle the cross page postback on the client, so they will be missing when the button is enable client-side.

I guess one solution would be to have the button enabled to start with (so that .Net adds the cross page postback controls) and then disable it using javascript as soon as the control loads on the client. But this sounds a bit clunky.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top