473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to set the "style" attribute in c sharp webbrowser

1
I have a webbrowser application and I need to change the "style" attribute of an HTMLElement. Every other attribute except style is working. I have no idea why.

Example:
Expand|Select|Wrap|Line Numbers
  1.   webBrowser.Document.GetElementById("elementName").SetAttribute("style", "display:block;");
  2.  
That does not work at all. Any suggestions/ideas?

I was reading this, http://weblogs.asp.net/rweigelt/archive/2006/11/27/1062699.aspx, and apparently Style has it's own property... I don't know. Any help is appreciated.
Jul 19 '10 #1
0 1592

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Markus Elfring | last post by:
How much are you interested that the attribute "style" will offer the same or similar capabilities like they are provided by the element "style" in the element "head"? Do you want that the...
4
by: mike | last post by:
regards: <a href="JavaScript:loadwindow(106,90);" style="font-family:Verdana;">元智Intranet</a> In HTML spec,are "href" and "style" called "attribute"?....@@ Could someone good give me the...
5
by: johnsuth | last post by:
I want to produce a trivial demonstration of dynamic modification. I thought that pressing a button might change its color. I studied O'Reillys books and successfully created the button with a...
1
by: Shurik | last post by:
Hey everyone, Just run into an issue with ASP.NET 2.0 Image control... I assign CSS style to it in HTML (CssClass="blah"), but when I hit the page with a browser my style isn't used due to...
1
by: awebguynow | last post by:
OK, I'm on the bandwagon, to mimic Google Suggest At this point I'm just trying to place my div in the right x, y spot. newdiv.setAttribute("style", "position:absolute;left:"+x+";top:"+y);...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.