views:

27

answers:

1

We have an ASP.Net page that uses a checkbox to toggle between a list view and a tree view.

The problem is that this triggers a post. When we then click on one of the documents in the list, then press back in the browser, we get a page expired error.

Is it possible to change the action of the check box to trigger a get with a parameter?

+3  A: 

You could disable the PostBack on the checkbox and use javascript (example with jQuery):

$('#yourcheckboxId').click(function() {
    window.location.href = '/somePage.aspx?someParam=someValue';
});
Darin Dimitrov