how to ignore postback data in particular situations

Discussion in 'ASP .Net Building Controls' started by tiago.private, Nov 15, 2008.

  1. Hi everybody,

    Imagine the following scenario:
    One System.Web.UI.UserControl (UC1) with 2 drop downs and one button
    One Webform with (UC1) and a GridView, basically the UC1 provides the
    options to the user to restrict (filter) the grid.

    The user changes the drop downs and then uses the Filter button to
    filter data (grid) that is the correct behavior.
    Now imagine that the user plays with the dropdowns, but he doesn't
    want to apply the filter and after he chooses to walk to a different
    page, that action will cause a postback of data, and the dropdown
    selections will be effective applied due to be changed by a previous
    use in the interface.

    The question is how can i avoid the postback (or ignore it) when
    postback is not fired due to the action of the "Fire" button ?

    I think the solution probably need to be client side, because it's not
    a problem of the grid filtering data based in the options, but also a
    visual consistency, when you do a postback and the page is rendered to
    the client the drop downs should reflect the filter applied.

    Any ideas, thoughts ....

    Thanks all for reading.

    tiago.private, Nov 15, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.