4
Answers

how to change background color of webbrowser control?

wajid ansari

wajid ansari

16y
25.9k
1

Hi

How to change the background and foreground color of a webbrowser control. If any one have sample code or any helpfull link please send it.

Thanks

Answers (4)
2
Satish Kathi

Satish Kathi

NA 361 0 16y

Foreground and background colors of Web Browser control depends/controlled by the content page you are loading into your control

 

But any how if want to show some background color on Browser control before loading any content(page) you can do this

 

webBrowser1.DocumentText = "<html><body style='background-color:Blue'></body></html>";

Accepted
1
Ashish chotalia

Ashish chotalia

NA 6 0 14y
Thanks a lot.

-Ashish
0
Thang Nguyen

Thang Nguyen

NA 2 0 13y
thanks ! But i want change colour by Transparent. Help me
0
Pal

Pal

NA 32 0 16y

Hi! If it is asp.net control,  then right click on the control and choose Style option. and then you can choose background color you want.

Patel