| | |
ASP.NET button backcolor changing from code.
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: Jan 2005
Posts: 8
Reputation:
Solved Threads: 0
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
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
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
•
•
Join Date: Jan 2009
Posts: 1
Reputation:
Solved Threads: 0
hi raj ,
try this
try this
ASP.NET Syntax (Toggle Plain Text)
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.
![]() |
Similar Threads
- Simple ASP.Net Login Page using C# (C#)
- Inserting values into the database using a asp.net button click (ASP.NET)
- ASP.NET/SQL Developer/Programmer (Web Development Job Offers)
- how to connect and querysql ASP.NET BY USING C# CODE (ASP.NET)
- ASP.Net / C# Web Developer (Web Development Job Offers)
- Disable ASP.NET Button from Listbox (ASP.NET)
- URGENT!: Saving Database information from ASP.NET Button (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: Report rebuilding error with microsoft vs 2003
- Next Thread: Pull XMl with attributes data in a datagrid
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer c# cac checkbox class commonfunctions compatible content contenttype countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deployment development dgv dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv formatdecimal formview gridview gudi iframe iis javascript listbox menu microsoft mouse mssql multistepregistration nameisnotdeclared news opera panelmasterpagebuttoncontrols problem redirect registration relationaldatabases reportemail schoolproject security serializesmo.table sessionvariables silverlight smartcard smoobjects software sql sql-server sqlserver2005 ssl textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webdevelopment webprogramming webservice youareanotmemberofthedebuggerusers





