473,785 Members | 2,354 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 1774
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
2480
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
1310
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
3355
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
4196
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
9646
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9484
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10350
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...
1
10097
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
9957
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8983
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
7505
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
6742
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5386
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...

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.