ASP.NET button backcolor changing from code.

Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Jan 2005
Posts: 8
Reputation: rooparaj is an unknown quantity at this point 
Solved Threads: 0
rooparaj rooparaj is offline Offline
Newbie Poster

ASP.NET button backcolor changing from code.

 
0
  #1
Mar 21st, 2005
Hi everybody,
I got one problem in ASP.NET.
i want to change button backcolor from code.
btn_save.bachgroundcolor=system.drawing.color.red
the above code is working fine.
But instead of "system.drawing.color.red" , i want to give #123234 or rgb() format.
i cant give
btn_save.bachgroundcolor=#23534
btn_save.bachgroundcolor=rgb(0,0,0)
I will give error as invalid return type is integer.

Can u plz tell me.
Thank you
Regards
Roopa Raj
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 793
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Solved Threads: 26
Team Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: ASP.NET button backcolor changing from code.

 
0
  #2
Mar 23rd, 2005
Try looking at :
LINK 1 - Button Changes

LINK 2 - Tab Control

You normal would change this using CSS , as VB script/code is the code for the business logic of the application. HTML is the layout code for the ASP.Net Page, and CSS would be used for styling the page(s).

Hope this helps
Originally Posted by rooparaj
Hi everybody,
I got one problem in ASP.NET.
i want to change button backcolor from code.
btn_save.bachgroundcolor=system.drawing.color.red
the above code is working fine.
But instead of "system.drawing.color.red" , i want to give #123234 or rgb() format.
i cant give
btn_save.bachgroundcolor=#23534
btn_save.bachgroundcolor=rgb(0,0,0)
I will give error as invalid return type is integer.

Can u plz tell me.
Thank you
Regards
Roopa Raj
Assistant Manager, Pharmacy Informatics
Wordpress Learning Blog
Updated : ASP.Net Login Code
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1
Reputation: sreenivas.varma is an unknown quantity at this point 
Solved Threads: 0
sreenivas.varma sreenivas.varma is offline Offline
Newbie Poster

Re: ASP.NET button backcolor changing from code.

 
0
  #3
Jan 16th, 2009
hi raj ,
try this
  1. btn1 .BackColor = System.Drawing.ColorTranslator.FromHtml("#FFFF00");
Last edited by peter_budo; Jan 18th, 2009 at 2:29 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC