473,770 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Printing an ASP.NET web page from VB.NET - (HTTPWebRespons e + Printing)

Hi There!

I'm trying to print ASP.NET pages to the printer. I know I can grab the
output contents of the ASP.NET page by using HttpWebRequest and
HttpWebResponse objects. However, once I got the contents, it is just HTML.
How do I go about printing that HTML as a graphical document to the
printer???

Many thanks!!!!

Jon
Jan 8 '06 #1
7 1772
Jon,

Why can't you print from your browser?

Eliyahu

"Jon B" <no*****@sorry. sorry> wrote in message
news:Or******** ******@TK2MSFTN GP15.phx.gbl...
Hi There!

I'm trying to print ASP.NET pages to the printer. I know I can grab the
output contents of the ASP.NET page by using HttpWebRequest and
HttpWebResponse objects. However, once I got the contents, it is just
HTML. How do I go about printing that HTML as a graphical document to the
printer???

Many thanks!!!!

Jon

Jan 8 '06 #2
Hi Eliyahu,

Thanks for the reply.

I need to automate the printing of ASP.NET pages. I'm actually developing a
VB.NET application. From there, user can click "Print" and I'm trying to
print out an ASP.NET page without user intervention.

Any ideas? Thanks again!
Jon

"Eliyahu Goldin" <re************ *@monarchmed.co m> wrote in message
news:uR******** ******@TK2MSFTN GP10.phx.gbl...
Jon,

Why can't you print from your browser?

Eliyahu

"Jon B" <no*****@sorry. sorry> wrote in message
news:Or******** ******@TK2MSFTN GP15.phx.gbl...
Hi There!

I'm trying to print ASP.NET pages to the printer. I know I can grab the
output contents of the ASP.NET page by using HttpWebRequest and
HttpWebResponse objects. However, once I got the contents, it is just
HTML. How do I go about printing that HTML as a graphical document to the
printer???

Many thanks!!!!

Jon




Jan 8 '06 #3
Is the printer on the server or on the client?

Eliyahu

"Jon B" <no*****@sorry. sorry> wrote in message
news:Og******** ******@TK2MSFTN GP14.phx.gbl...
Hi Eliyahu,

Thanks for the reply.

I need to automate the printing of ASP.NET pages. I'm actually developing
a
VB.NET application. From there, user can click "Print" and I'm trying to
print out an ASP.NET page without user intervention.

Any ideas? Thanks again!
Jon

"Eliyahu Goldin" <re************ *@monarchmed.co m> wrote in message
news:uR******** ******@TK2MSFTN GP10.phx.gbl...
Jon,

Why can't you print from your browser?

Eliyahu

"Jon B" <no*****@sorry. sorry> wrote in message
news:Or******** ******@TK2MSFTN GP15.phx.gbl...
Hi There!

I'm trying to print ASP.NET pages to the printer. I know I can grab the
output contents of the ASP.NET page by using HttpWebRequest and
HttpWebResponse objects. However, once I got the contents, it is just
HTML. How do I go about printing that HTML as a graphical document to
the
printer???

Many thanks!!!!

Jon



Jan 8 '06 #4
Hi Eliyahu,

It's on the client.

Thanks again!
Jon

"Eliyahu Goldin" <re************ *@monarchmed.co m> wrote in message
news:e5******** ******@TK2MSFTN GP15.phx.gbl...
Is the printer on the server or on the client?

Eliyahu

"Jon B" <no*****@sorry. sorry> wrote in message
news:Og******** ******@TK2MSFTN GP14.phx.gbl...
Hi Eliyahu,

Thanks for the reply.

I need to automate the printing of ASP.NET pages. I'm actually developing
a
VB.NET application. From there, user can click "Print" and I'm trying to
print out an ASP.NET page without user intervention.

Any ideas? Thanks again!
Jon

"Eliyahu Goldin" <re************ *@monarchmed.co m> wrote in message
news:uR******** ******@TK2MSFTN GP10.phx.gbl...
Jon,

Why can't you print from your browser?

Eliyahu

"Jon B" <no*****@sorry. sorry> wrote in message
news:Or******** ******@TK2MSFTN GP15.phx.gbl...
Hi There!

I'm trying to print ASP.NET pages to the printer. I know I can grab the
output contents of the ASP.NET page by using HttpWebRequest and
HttpWebResponse objects. However, once I got the contents, it is just
HTML. How do I go about printing that HTML as a graphical document to
the
printer???

Many thanks!!!!

Jon



Jan 8 '06 #5
Hello Jon,

Use the axWebbrowser control to load the page in HTML format and print it
from there.

Cheers
Cyril Gupta
Jan 9 '06 #6
Jon,

On client side ASP.NET pages run in browsers as HTML pages. The browser
holds the page HTML content.What sort of user intervention are you trying to
avoid?

Eliyahu

"Jon B" <no*****@sorry. sorry> wrote in message
news:e7******** *****@TK2MSFTNG P09.phx.gbl...
Hi Eliyahu,

It's on the client.

Thanks again!
Jon

"Eliyahu Goldin" <re************ *@monarchmed.co m> wrote in message
news:e5******** ******@TK2MSFTN GP15.phx.gbl...
Is the printer on the server or on the client?

Eliyahu

"Jon B" <no*****@sorry. sorry> wrote in message
news:Og******** ******@TK2MSFTN GP14.phx.gbl...
Hi Eliyahu,

Thanks for the reply.

I need to automate the printing of ASP.NET pages. I'm actually
developing a
VB.NET application. From there, user can click "Print" and I'm trying to
print out an ASP.NET page without user intervention.

Any ideas? Thanks again!
Jon

"Eliyahu Goldin" <re************ *@monarchmed.co m> wrote in message
news:uR******** ******@TK2MSFTN GP10.phx.gbl...
Jon,

Why can't you print from your browser?

Eliyahu

"Jon B" <no*****@sorry. sorry> wrote in message
news:Or******** ******@TK2MSFTN GP15.phx.gbl...
> Hi There!
>
> I'm trying to print ASP.NET pages to the printer. I know I can grab
> the
> output contents of the ASP.NET page by using HttpWebRequest and
> HttpWebResponse objects. However, once I got the contents, it is just
> HTML. How do I go about printing that HTML as a graphical document to
> the
> printer???
>
> Many thanks!!!!
>
> Jon
>




Jan 9 '06 #7
I am using axWebBrowser in my Windows application, however, I don't know the
control very well. Any site provide me more information about "axWebBrows er"?
Please help. Thanks.

Jason

"Cyril Gupta" wrote:
Hello Jon,

Use the axWebbrowser control to load the page in HTML format and print it
from there.

Cheers
Cyril Gupta

Jan 30 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2479
by: love_norip | last post by:
I have encountered a problem when I try to visit a web page (like http://www.xxx.org....?arg1=x&arg2=x&....) using HttpWebRequest and HttpWebResponse and related methods .NET provides.The code is like this: .... HttpWebRequest r = (HttpWebRequest)WebRequest.Create(url); HttpWebResponse rp = r.GetResponse(); .... However,I've got the error page that is redirected to by the page I request.And the response page says that "you have no...
2
3319
by: Iggy Evans | last post by:
Hi My app is trying to login to an ASP.NET site that uses Forms authentication. I am trying to do in my app (what was previously posted in a newsgroup) the same that a browser does 3) The browser requests the login page specified 4) The server responds with the login pag 5) The user fills in the login page and submits the form, so the browser POSTs the form back to the login pag 6) If the credentials are valid, the server responds with...
2
1307
by: Just D. | last post by:
Does anybody know how can we check if the URL exists inside currently running web application written in C#? For example I'm having the page name like: "SomePage.aspx" and I need to know if this URL exists and I can safely redirect to it or I should make some replacement for this url if it doesn't. Can we control the method Response.Redirect(SomeURL) ? Just D.
1
1094
by: PetroMan | last post by:
I am using VB .Net with HTTPWebRequest/HTTPWebResponse to navigate a web site and print invoices (not download them - their requirements, not mine). The related web site, when printing an invoice, modifies the current HTML that displays the invoice, creates a new window and does a print. The corresponding Java script is: Var THEhtml = '<HTML> \n<HEAD>\n';
0
1534
by: Howeird | last post by:
Problem: I am writting a quick and dirty web link checker for a site that allows local business to post their web site's URL. I have encountered a probelm when the reqested URI points to a site that contains a frame loading content from another domain. Any insight would be welcome. The Web Page: I try to hit a url (see code below) say http://www.somedomain.com, works fine from IE, but HttpWebResponse gives 404 the web site source...
7
3352
by: Jon B | last post by:
Hi There! I'm trying to print ASP.NET pages to the printer. I know I can grab the output contents of the ASP.NET page by using HttpWebRequest and HttpWebResponse objects. However, once I got the contents, it is just HTML. How do I go about printing that HTML as a graphical document to the printer??? Many thanks!!!!
0
1105
by: davidpenty | last post by:
Hi there, I am having some problems with a multi-threaded asp.net seach page. My search page sends off four asynchronous http requests to four search engines then waits for the results to come back (in xml) The searches are just URLs with querystrings. Each request sets a boolean to true when it has got a reply from the search engine. I have declare the booleans as 'volatile'.
4
4195
by: Kuldeep | last post by:
Hi All, I am trying to read the contents of a page through its URL. My code snippet is as follows: public void mtdGetPageDataHWR() { HttpWebRequest objRequ = (HttpWebRequest)WebRequest.Create("http://www.microsoft.com"); HttpWebResponse objResp = (HttpWebResponse)objRequ.GetResponse();
1
1729
by: beebee | last post by:
OK all I have a webservice utilizing API's in to an application. I want to call this service and load the returned information onto my aspx page. right now i am not getting any errors in my code... but i am not getting any results either. So 1. How to i implement an alert type function in my code to see what values are coming in?
0
10254
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10099
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8929
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7451
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3607
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.