Re: Webclient.downloaddata

From: Hermit Dave (hermitd.REMOVE_at_CAPS.AND.DOTS.hotmail.com)
Date: 09/17/04


Date: Fri, 17 Sep 2004 23:43:35 +0100

if you are using IE or something this might be helpful.

what html the controls render is determined by the browser and since by
default webclient doesnt not explicity specify any... it goes for browser
neutral styles and html.

try this sort of mechanism (from msdn webclient overview)

' Add a user agent header in case the
' requested URI contains a query.
client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows
NT 5.2; .NET CLR 1.0.3705;)")

same syntax for C# and VB.NET

-- 
Regards,
Hermit Dave
(http://hdave.blogspot.com)
"Rags" <Rags@discussions.microsoft.com> wrote in message
news:0501991D-A93F-4358-86C5-C6FA59F90E0B@microsoft.com...
> Hi
>
> We are creating a web application using .NET which renders some reports.
The
> reports are created in MS Reporting Services and can be accessed by typing
in
> a URL with the required parameters in a browser. The reports are getting
> rendered fine if I type the URL in the browser. Within the web
application,
> however, we are using the webclient.downloaddata method to extract the
HTML
> by specifying the URL and rendering within the .NET application. Here I am
> finding that the report is not maintaing its formatting. More
specifically,
> the webclient.downloaddata method doesnot seem to extract the style
element
> in the HTML source code which seems to be causing the problem.
>
> Any suggestions. We are fast approaching our deadlines.
>
> Thanks
> -- 
> Rags


Relevant Pages

  • OT: HTML (WAS: MF having issues?)
    ... Even though he is only serving up static HTML pages and has no idea how they work or the fine points of the language, he has a very professional looking site that he built in about an hour. ... Though leading browser makers have been involved in the creation of web standards since W3C was formed, for many years compliance was observed in the breach. ... By releasing browsers that failed to uniformly support standards, manufacturers needlessly fragmented the Web, injuring designers, developers, users, and businesses alike. ... It is not enough for the website to simply "look okay" on any one particular browser; the HTML should be structurally correct, and the tags used for their semantics, rather than how they render in one particular browser. ...
    (comp.lang.cobol)
  • Re: italic, bold, etc. in Safari
    ... > visual browsers, through bold text, then use CSS to say so: ... Is there HTML logical markup for "example of foreign ... I specifically chose to do this because I figured that any browser, ... render any differently from regular text either. ...
    (comp.sys.mac.system)
  • Re: GDI+ Question
    ... can be viewed in a browser. ... In an HTML document, images are ... render an image, by having the ASPX page call its method for sending the ... > could format it and manipulate it better. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Webclient.downloaddata
    ... > what html the controls render is determined by the browser and since by ... > neutral styles and html. ... The reports are getting ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: My new website
    ... >>> coffee pot and the radio animation because they are less busy. ... which read that line so they know what to render. ... HTML) and check the Document Type Definition "HTML 4.0 Transitional".' ... The browser will change all the newlines into single spaces ...
    (rec.arts.sf.composition)

Loading