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

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

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

hi raj ,
try this

btn1 .BackColor = System.Drawing.ColorTranslator.FromHtml("#FFFF00");
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.