Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Passing a field's lable

Reply
Thread Tools

Passing a field's lable

 
 
Lukelrc
Guest
Posts: n/a
 
      07-08-2004
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
 
Reply With Quote
 
 
 
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      07-08-2004
> 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



 
Reply With Quote
 
 
 
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      07-08-2004
> 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.)


 
Reply With Quote
 
Luke Curtis
Guest
Posts: n/a
 
      07-08-2004
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!
 
Reply With Quote
 
David C. Holley
Guest
Posts: n/a
 
      07-09-2004
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for a NON thermal single lable printer Jack B. Pollack Computer Support 14 10-03-2012 05:56 PM
asp Lable does not wrap at new line. Nalaka ASP .Net 8 12-06-2005 07:15 PM
Writing on lable side of a DVD ALMINS1@webtv.net DVD Video 8 06-05-2005 09:30 AM
Displaying dataset object on a lable control without onClick or button events Chumley Walrus ASP .Net 0 04-19-2005 09:53 PM
Recomendations for a good lable printer Beachcomber Computer Information 1 01-16-2005 09:35 PM



Advertisments