.NETGURU
Dynamically add text to an image
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngclient' list.


Greg Huber
-- Moved from [aspngfreeforall] to [aspngclient] by GODD <Click here to reveal e-mail address> --

The web application I am creating gives the user the ability to change text
on a button (we store the button text in a database). I was wondering if it
is possible to have a background image for the buttons image source, and
then overlay text on it. I don't necessarily want to dynamically create
an image for every button (there are a lot of buttons and that would seem
slow and disk intensive). I just want to add text on top of it. I don't
mind doing it with DHTML if that's the only way, however I still need to
programatically enable/disable buttons on the screen based on security
permissions (so it must be a server control).

Any article links or code samples would be appreciated.

Thanks,
    Greg

Reply to this message...
 
    
FrogBody
If you're okay using a DHTML layer, why not just output the layer - or
not, based on your security settings?

Carson

-----Original Message-----
From: Greg Huber [mailto:Click here to reveal e-mail address]
Sent: Friday, August 09, 2002 6:16 AM
To: aspngclient
Subject: [aspngclient] Dynamically add text to an image

-- Moved from [aspngfreeforall] to [aspngclient] by GODD
<Click here to reveal e-mail address> --

The web application I am creating gives the user the ability to change
text
on a button (we store the button text in a database). I was wondering
if it
is possible to have a background image for the buttons image source, and
then overlay text on it. I don't necessarily want to dynamically
create
an image for every button (there are a lot of buttons and that would
seem
slow and disk intensive). I just want to add text on top of it. I don't
mind doing it with DHTML if that's the only way, however I still need to
programatically enable/disable buttons on the screen based on security
permissions (so it must be a server control).

Any article links or code samples would be appreciated.

Thanks,
    Greg
| [aspngclient] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/aspngclient.asp = JOIN/QUIT
-

-

Reply to this message...
 
    
Greg Huber
I just wondered if there is a ".NET Way" to do this or if I have to do some
custom client coding.

-----Original Message-----
From: FrogBody [mailto:Click here to reveal e-mail address]
Sent: Friday, August 09, 2002 12:03 PM
To: aspngclient
Subject: [aspngclient] RE: Dynamically add text to an image

If you're okay using a DHTML layer, why not just output the layer - or
not, based on your security settings?

Carson

-----Original Message-----
From: Greg Huber [mailto:Click here to reveal e-mail address]
Sent: Friday, August 09, 2002 6:16 AM
To: aspngclient
Subject: [aspngclient] Dynamically add text to an image

-- Moved from [aspngfreeforall] to [aspngclient] by GODD
<Click here to reveal e-mail address> --

The web application I am creating gives the user the ability to change
text
on a button (we store the button text in a database). I was wondering
if it
is possible to have a background image for the buttons image source, and
then overlay text on it. I don't necessarily want to dynamically
create
an image for every button (there are a lot of buttons and that would
seem
slow and disk intensive). I just want to add text on top of it. I don't
mind doing it with DHTML if that's the only way, however I still need to
programatically enable/disable buttons on the screen based on security
permissions (so it must be a server control).

Any article links or code samples would be appreciated.

Thanks,
    Greg
| [aspngclient] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/aspngclient.asp = JOIN/QUIT
-

-

| [aspngclient] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/aspngclient.asp = JOIN/QUIT

Reply to this message...
 
    
FrogBody
Sure, you could use a panel control. Set it's background
(mypanel.BackImageURL) to be your button image, put your text (using a
label control) on top of that (inside the panel) and then manipulate the
visible property of the panel (mypanel.Visible=True/False) based on your
security settings.

HTH
Carson

-----Original Message-----
From: Greg Huber [mailto:Click here to reveal e-mail address]
Sent: Friday, August 09, 2002 10:21 AM
To: aspngclient
Subject: [aspngclient] RE: Dynamically add text to an image

I just wondered if there is a ".NET Way" to do this or if I have to do
some
custom client coding.

-----Original Message-----
From: FrogBody [mailto:Click here to reveal e-mail address]
Sent: Friday, August 09, 2002 12:03 PM
To: aspngclient
Subject: [aspngclient] RE: Dynamically add text to an image

If you're okay using a DHTML layer, why not just output the layer - or
not, based on your security settings?

Carson

-----Original Message-----
From: Greg Huber [mailto:Click here to reveal e-mail address]
Sent: Friday, August 09, 2002 6:16 AM
To: aspngclient
Subject: [aspngclient] Dynamically add text to an image

-- Moved from [aspngfreeforall] to [aspngclient] by GODD
<Click here to reveal e-mail address> --

The web application I am creating gives the user the ability to change
text
on a button (we store the button text in a database). I was wondering
if it
is possible to have a background image for the buttons image source, and
then overlay text on it. I don't necessarily want to dynamically
create
an image for every button (there are a lot of buttons and that would
seem
slow and disk intensive). I just want to add text on top of it. I don't
mind doing it with DHTML if that's the only way, however I still need to
programatically enable/disable buttons on the screen based on security
permissions (so it must be a server control).

Any article links or code samples would be appreciated.

Thanks,
    Greg
| [aspngclient] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/aspngclient.asp = JOIN/QUIT
-

-

| [aspngclient] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/aspngclient.asp = JOIN/QUIT

| [aspngclient] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/aspngclient.asp = JOIN/QUIT
-

-

Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification