views:

203

answers:

1

I want to make a page so I can select filters in a "jquery popup", but I don't know how to receive the results.

Suppose I have a page with a ListView, and I want to select filters for it (perhaps with multiple selection from a list), so I make a different ASPX and open it using jquery (actually jqModal) via ajax, the user selects the filters, and accepts.

How do I get that selection to rebind my ListView?

(...)

I just selected the URL for the link above in a jQuery popup, that's exactly what I want to do... how is it accomplished?

A: 

I think the simplest solution would be to have an asp button with style="display:none". In the javascript function which closes the popup, fake a click on that button. Then have a regular event handler to rebind your listview.

HTML:

<div class="jqmWindow" id="dialog">
    <asp:ListView runat="server" id="lvFilter" />
</div>
<asp:Button runat="server" id="btnFilter" OnClick="btnFilter_Click" style="disaply:none" />

Javascript:

$('#dialog').jqm({
    onHide:function() {
      $("#<%= btnFilter.ClientID %>").click();
    }
});

Server Side:

btnFilter_Click todo normal filtering.

Bob