How to disable CSS in a webpage ( Web Browser control ) in VB .net

223 views
Skip to first unread message

ravi

unread,
Sep 26, 2008, 7:16:27 AM9/26/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hi,
I need some help with Toggling CSS in a webpage.
I am using the WebBrowser control.
Right now I am using Javascript to disable(remove) the styles
available inside a webpage.
But the problem with this is that I am not able to re-enable the CSS
back into the webpage.

I am looking for another solution where I can enable or disable the
CSS inside the webpage.

Thanks,
Ravi

Cerebrus

unread,
Sep 26, 2008, 1:35:45 PM9/26/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
*Why* would you want to do this, please ?

dboy haha

unread,
Sep 26, 2008, 4:27:12 PM9/26/08
to DotNetDe...@googlegroups.com
Are you removing styles to controls only because if so I would just create different themes for your website. If you ever look a google, you may have noticed that on Christmas, Halloween, or Thanksgiving the website has a look corresponding to the current holiday. They use themes to change between different looks, so maybe you should have a default theme and then other themes for whatever else you want.

ravi

unread,
Sep 30, 2008, 12:21:52 AM9/30/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hi,
Its not for my website.
I need to enable and disable CSS in a webbrowser available in my
VB .net Application.
I am able to disable the CSS, but I am facing some issues when I try
re-enable it back.

I need to enable and disable CSS with a click of a button.



On Sep 27, 1:27 am, "dboy haha" <houseoflaughs.h...@gmail.com> wrote:
> Are you removing styles to controls only because if so I would just create
> different themes for your website. If you ever look a google, you may
> have noticed that on Christmas, Halloween, or Thanksgiving the website has a
> look corresponding to the current holiday. They use themes to change between
> different looks, so maybe you should have a default theme and then other
> themes for whatever else you want.
>

CK

unread,
Sep 30, 2008, 10:28:36 AM9/30/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
can you not just reload the page to reenable it?
> > > > Ravi- Hide quoted text -
>
> - Show quoted text -

ravi

unread,
Oct 13, 2008, 7:40:17 AM10/13/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
hmm..that will work....

jack me

unread,
Oct 14, 2008, 12:36:41 AM10/14/08
to DotNetDe...@googlegroups.com
Make a theme and put empty all css tags in that and it will work..... Call  it on a button click......
Reply all
Reply to author
Forward
0 new messages