avoiding postback

Discussion in 'ASP .Net' started by =?Utf-8?B?Tkg=?=, Jun 13, 2005.

  1. Hi,

    I have two dropdown lists in a web form. When you choose an entry in the
    first list the code retrieves records from the database and displays them in
    the second dropdownlist.

    Is there a way of avoiding a postback with this by maybe retrieving all the
    data at the start and then filtering what should be displayed on the second
    dropdown list on the client side?

    Thanks
    N
     
    =?Utf-8?B?Tkg=?=, Jun 13, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?Tkg=?=

    Brock Allen Guest

    Sure this can be done, but it requires lots of javascript that you'd need
    to write. The model with ASP.NET is a server side model, so most anything
    that is dynamic and needs code to execute will go back to the server. If
    this is not desired then, like I mentioned above, you'll need to build that
    infrastructure yourself.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > Hi,
    >
    > I have two dropdown lists in a web form. When you choose an entry in
    > the first list the code retrieves records from the database and
    > displays them in the second dropdownlist.
    >
    > Is there a way of avoiding a postback with this by maybe retrieving
    > all the data at the start and then filtering what should be displayed
    > on the second dropdown list on the client side?
    >
    > Thanks
    > N
     
    Brock Allen, Jun 13, 2005
    #2
    1. Advertising

  3. Thanks, thats pretty much what I thought. It would be nice if Microsoft had
    some friendly client side code which would work easily with asp.net, I know
    that certain things can be done but its just rather overly complicated.

    "Brock Allen" wrote:

    > Sure this can be done, but it requires lots of javascript that you'd need
    > to write. The model with ASP.NET is a server side model, so most anything
    > that is dynamic and needs code to execute will go back to the server. If
    > this is not desired then, like I mentioned above, you'll need to build that
    > infrastructure yourself.
    >
    > -Brock
    > DevelopMentor
    > http://staff.develop.com/ballen
    >
    >
    >
    > > Hi,
    > >
    > > I have two dropdown lists in a web form. When you choose an entry in
    > > the first list the code retrieves records from the database and
    > > displays them in the second dropdownlist.
    > >
    > > Is there a way of avoiding a postback with this by maybe retrieving
    > > all the data at the start and then filtering what should be displayed
    > > on the second dropdown list on the client side?
    > >
    > > Thanks
    > > N

    >
    >
    >
    >
     
    =?Utf-8?B?Tkg=?=, Jun 13, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Psych971
    Replies:
    5
    Views:
    4,651
    bruce barker
    Dec 17, 2004
  2. =?Utf-8?B?Q2hhZA==?=

    Postback not being set to True on first postback

    =?Utf-8?B?Q2hhZA==?=, Apr 4, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    516
    =?Utf-8?B?Q2hhZA==?=
    Apr 4, 2005
  3. SBK
    Replies:
    1
    Views:
    449
    bruce barker
    Sep 3, 2007
  4. Avoiding Postback with Treeview

    , Mar 20, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    135
  5. SBK
    Replies:
    0
    Views:
    154
Loading...

Share This Page