postback help needed

Discussion in 'ASP .Net' started by =?Utf-8?B?Q2hyaXM=?=, Oct 12, 2005.

  1. Hi,

    I am writing a web app in C#.

    I have a webform with a drop down list box that is populated with user names.
    I load this only on if not is a postback, which means it only loads the
    first time user
    visits the page.

    this same page contains controls and the code to create a new user account.
    When a new user is created I would like to reload the drop down list because
    it will now have an additional user.

    It is also a multi user app, so that means other people need to know of the
    new user in the drop down.

    I was thinking of either always reloading just the drop down list on post
    back, which causes a hit on database

    or.

    append a new line item to bottom of the drop down list, the new user will
    appear at the bottom but not in the order when normally database queried.

    which is better solution, more professional, friendly, or is there an even
    better way?

    thanks

    Chris
    =?Utf-8?B?Q2hyaXM=?=, Oct 12, 2005
    #1
    1. Advertising

  2. Just realized that repopulating with a post back wipes out the value in my
    selected changed event. It searches for the first item in the drop down list
    , which is
    text "Please choose a user name".

    another challenge to over come.

    "Chris" wrote:

    > Hi,
    >
    > I am writing a web app in C#.
    >
    > I have a webform with a drop down list box that is populated with user names.
    > I load this only on if not is a postback, which means it only loads the
    > first time user
    > visits the page.
    >
    > this same page contains controls and the code to create a new user account.
    > When a new user is created I would like to reload the drop down list because
    > it will now have an additional user.
    >
    > It is also a multi user app, so that means other people need to know of the
    > new user in the drop down.
    >
    > I was thinking of either always reloading just the drop down list on post
    > back, which causes a hit on database
    >
    > or.
    >
    > append a new line item to bottom of the drop down list, the new user will
    > appear at the bottom but not in the order when normally database queried.
    >
    > which is better solution, more professional, friendly, or is there an even
    > better way?
    >
    > thanks
    >
    > Chris
    =?Utf-8?B?Q2hyaXM=?=, Oct 12, 2005
    #2
    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,592
    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:
    482
    =?Utf-8?B?Q2hhZA==?=
    Apr 4, 2005
  3. gce
    Replies:
    2
    Views:
    1,693
  4. Jacky Chau
    Replies:
    2
    Views:
    2,022
    Ninjamyst
    Jun 8, 2005
  5. Ryan Macy

    Ideas needed & help needed!

    Ryan Macy, Jul 19, 2006, in forum: Ruby
    Replies:
    2
    Views:
    493
    Ryan Macy
    Jul 19, 2006
Loading...

Share This Page