Passing a field's lable

L

Lukelrc

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
 
A

Aaron [SQL Server MVP]

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
 
A

Aaron [SQL Server MVP]

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
 
L

Luke Curtis

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!
 
D

David C. Holley

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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top