Passing a field's lable

Discussion in 'ASP General' started by Lukelrc, Jul 8, 2004.

  1. Lukelrc

    Lukelrc Guest

    Hi,

    I have a listfield that displays a list of 'Themes' stored in a
    database. The listfield's lable is Themenames and it's value is
    UniqueThemeID. The page that i'm designing allows the user to add or
    remove Themes to this list which updates the database.

    When the user adds a theme i can use the UniqueThemeID (which is
    passed when the form is submitted) to display a page saying that "The
    theme *Themename* has been added to the database". My problem is that
    i cant do this when the user wants to delete the theme beacuse the
    UniqueThemeID no longer exists in the database. So somehow i need to
    pass the listfields selected lable, maybe with a hidden field of
    something, but i'm stummped as how i can do this. Does anyone have any
    solutions. I sure other people must have had this problem in the past,
    but i cant find anything on it.

    Thanks, Luke
    Lukelrc, Jul 8, 2004
    #1
    1. Advertising

  2. > theme *Themename* has been added to the database". My problem is that
    > i cant do this when the user wants to delete the theme beacuse the
    > UniqueThemeID no longer exists in the database.


    Why not? Why don't you store the themeID?

    > pass the listfields selected lable, maybe with a hidden field of
    > something, but i'm stummped as how i can do this.

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)


    Does anyone have any
    > solutions. I sure other people must have had this problem in the past,
    > but i cant find anything on it.
    >
    > Thanks, Luke
    Aaron [SQL Server MVP], Jul 8, 2004
    #2
    1. Advertising

  3. > theme *Themename* has been added to the database". My problem is that
    > i cant do this when the user wants to delete the theme beacuse the
    > UniqueThemeID no longer exists in the database.


    Why not? Why don't you store the themeID?

    > pass the listfields selected lable, maybe with a hidden field of
    > something, but i'm stummped as how i can do this.


    You can do this with client-side script. Please see a client-side group.
    microsoft.public.scripting.jscript

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)
    Aaron [SQL Server MVP], Jul 8, 2004
    #3
  4. Lukelrc

    Luke Curtis Guest

    I've sorted it.

    What i did was put some code to set up another recordset that opened and
    returend the ThemeName and stored it as a variable before the code that
    deleted it from the database. Just a matter of putting the functions in
    the correct order.


    *** Sent via Devdex http://www.devdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Luke Curtis, Jul 8, 2004
    #4
  5. You'll probably want to store the Themename in a session variable and
    then use the variable to get the name when you're ready to print the
    advisory. If I were doing the design, I would actually go so far as to
    requery the database after the DELETE (or INSERT) and then display a
    full list of the themes.

    Lukelrc wrote:

    > Hi,
    >
    > I have a listfield that displays a list of 'Themes' stored in a
    > database. The listfield's lable is Themenames and it's value is
    > UniqueThemeID. The page that i'm designing allows the user to add or
    > remove Themes to this list which updates the database.
    >
    > When the user adds a theme i can use the UniqueThemeID (which is
    > passed when the form is submitted) to display a page saying that "The
    > theme *Themename* has been added to the database". My problem is that
    > i cant do this when the user wants to delete the theme beacuse the
    > UniqueThemeID no longer exists in the database. So somehow i need to
    > pass the listfields selected lable, maybe with a hidden field of
    > something, but i'm stummped as how i can do this. Does anyone have any
    > solutions. I sure other people must have had this problem in the past,
    > but i cant find anything on it.
    >
    > Thanks, Luke
    David C. Holley, Jul 9, 2004
    #5
    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. Chumley Walrus
    Replies:
    0
    Views:
    373
    Chumley Walrus
    Apr 19, 2005
  2. Nalaka
    Replies:
    8
    Views:
    8,814
  3. wang frank

    how to find a lable quickly?

    wang frank, May 4, 2007, in forum: Python
    Replies:
    3
    Views:
    285
    Duncan Booth
    May 4, 2007
  4. JDP@Work

    Can validation Update a Lable with a Date or Similar?

    JDP@Work, Oct 14, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    96
    JDP@Work
    Oct 15, 2004
  5. Sound
    Replies:
    2
    Views:
    429
    Randy Webb
    Sep 28, 2006
Loading...

Share This Page