Print page function in VB .net


I am new in, and I am having a hard time figuring out how to print a page when clicking on a button.
I know I have to use the printdocument class, but it is a bit confusing the training material on-line.
Can somebody explain to me how to make such a print function on a page, and post an example???
Would really appreciate it!
1/23/2004 1:08:13 PM 93655 articles. 6 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 4
Get it on Google Play
Get it on Apple App Store

You need to use Javascript, because the web page is on the client with no connection to the server while the user is actually browsing the page.  Here is a link to an FAQ on printing in JavaScript.
Starting with ASP.NET 2.0? Look at:
Programming Microsoft Web Forms
My Blog
1/23/2004 1:14:53 PM

Similar Artilces:

Both C# ASPX pages and VB.NET ASPX in single VB.NET Web Applcation Template
Hi.. Is it possible to have both c# pages and VB pages in same Webapplication, what i chose is VB.NET Web application Template. With Thanks, Jaya.... I don't see why you couldn't, but for the sake of consistency I don't know why you would want to do this. When you choose a C# or VB.NET application template(I'm assuming you're using VS or WebMatrix), it simply creates a .aspx file that includes a page directive that specifies the page language. If you created a C# template but want to use VB.Net instead, you need to go from: <%@ Page Language="C#" .... to...

Print button on web page
I have a form on a aspx page and when they click the print button the button click event I am trying to get the Print properties box comes up for them to print.  Does anyone have any code examples of how to do this. Hi,on your page you can place this code:<input type="button" value="Print page..." onclick="window.print();" /> Grz, Kris. Read my blog. Handy Firefox plugins for web developers.Workaround for non working Mark as answer buttons. Add following code to your Button click event..  String s= "<script language=&...

Functions in Web Pages using VB.NET
Does anyone know where to place a FUNCTION with WEB Programming using VB.NET code behind? For example, if I have 4 ASPX pages and will use the same function, where or what part of the web page can I place this function or do I need to have that function in each of the ASPX page? Unlike in a COM program using VB.NET, that function would most probably reside in the MODULE and any VB.NET form can easily call it. TIF you can put it in a class***********************Dinakar NethiLife is short. Enjoy it.*********************** Thanks....

Sending SMS using or using or
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

windows forms in vb .net into web forms
we are creating a database driven website as part of our project. currently we have forms connecting to the database created in visual basic. these windows forms we need to convert into web forms which are asp .net compatible. can u give me an answer or show me a way. Hi, because of the difference in nature between web and win applications you'll need to reimplement at least the UI part. If you have a multitiered application in which the busines logic and data access are in different parts/assemblies you can reuse them. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Wor...

Accessing a method within a class VB.NET from a Web Form page.
 I got the following class within my App_Code folder under a file called DataAccess.vb: Namespace CircaComArtAccess Public Class ComArtData Private _connstr As String = System.Configuration.ConfigurationManager.ConnectionStrings("ESQLConn").ConnectionString() Public Sub ComArtGrid(ByVal procedurename As String, _ ByVal parameters() As SqlParameter, _ ByVal gridname As ComponentArt.Web.UI.Grid, _ ByVal e As ComponentArt.Web.UI.CallBackEventArgs, _ Optional ByVal commandtype As CommandType = 1 _ ) Dim SQLConn As SqlConnection...

Acessing variables, objects and functions from javascript to VB .NET Web Forms
I have included some javascript files in my application. I want to access the variables, objects and functions of Javascript to the VB.NET Web Forms, which means that I want to transfer the methods from Javascript to the code-behind in a web form. How do I do this? Can anybody help me with some sample codes...thanks in advance . you can't pass javascript variables (client side) to code-behind (server side). you can however put your variables into hidden input fields then access those input fields from code-behind. or use ajax I think the only way to do this is...

Can you return .net web controls in a .net page from a web service?
I've got a problem with a project. I've got to compile an entire .net page and return it as part of a Web Service for display. The problem I have is that I need to add WebControls and functionality to the page so that not only the html content and images are displayed (which I've managed) but that textboxes, labels, buttons and datasets can be displayed also. Essentially I need to make a call from one site for a page, populate the page and return it in a state as though it resided on the same server/webspace as the calling page. Code is currently built as follows into a string: strOpenHT...

Implementing .Net Form into an web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

Converting Web Site from Vb.Net 2003 to Vb.Net 2005
I have a web site in 2003 that I what to convert to 2005. I open my web site in the visual studio 2005 by Local IIS option. I follow the steps of the visual studio conversion wizard.In the conversion report I received the following warning 'Referencepath' settings have not been converted.  Can anyone tell what I have to do to make this warning disappear? Best regards,Sérgio 'Referencepath'  is a property you can set with with VS2003 project file, sothat when ever you to do Add reference this path is serached for class libraries.  We do not  have that ...

Paging in AP.NET/VB.NET
Hi All, Well... a simple problem perhaps regarding paging in an application using I have a datagrid named dgResult and being trying to implement paging on it.  Following is the code to capture the PageIndexChanged event. Sub dgResult_PageIndexChanged(ByVal sender As Object, ByVal e As DataGridPageChangedEventArgs) Handles dgResult.PageIndexChanged dgResult.CurrentPageIndex = e.NewPageIndex GetProperData() End Sub I have a break point at dgResult.Curre.... position.  The datagrid, just do not accept the method and I can not event trap the event using a break ...

Acessing variables,arrays, objects and functions from javascript to VB .NET Web Forms
I have a textbox where user can put data.I store data into an array .I did this with java i want to acess the array from the Codebehind  in web is the codefunction MakeArray( n ) { if( n <= 0 ) { this.length = 0; return this; } this.length = n; for( var i = 1; i <= n; i++ ) { this[ i ] = 0; } return this; } var Form1 = new MakeArray( 25 ); var index = 0; var cmmnd = 1; function f_store( sTR ) { var i; if( index >= Form1.length ) { for( i = 1; i < Form1.length; i++ ) Form1[i-1] = Form1; index = Form1.length - 1; } Form1[ index ] = cmmnd + ":" + sT...

convert page to
ok I have an entire page in and now I want to integrate some code from another page but it written in what is the easiest way to convert to I tried using but it only gave me errors here is what I am trying to convert let me know if you have any ideas With Alex Lowe's translator ' Messages Private NoFileMessage As String = "No file selected" Private UploadSuccessMessage As String = "Uploaded Sucess" Private NoImagesMessag...

to print a form in
hi i want to know how to print an output form....

Web resources about - Print page function in VB .net -

Talk:Trigonometric functions - Wikipedia, the free encyclopedia
This article is within the scope of WikiProject Mathematics , a collaborative effort to improve the coverage of Mathematics on Wikipedia. If ...

TV binging, exercise skipping linked to poor cognitive function
Bad habits early in life may affect brain power later, researchers suggest.

iPhone best tricks and functions - Business Insider
Your iPhone can do a lot more than you think.

Review: HP Spectre 360 A Perfect Mix Of Style, Form, Function
HP Inc. delivers a brushed-aluminum laptop with a new 6th Generation Intel i7 processor, making it one of the best-looking, best-priced and best-performing ...

HPE Offers Catalog of Virtual Network Functions for Telcos
The vendor's OpenNFV Solution Portal gives carriers a single place to find a range of VNFs that are pre-tested to run on their networks.

Why Global Corporations Need To Redesign Their Strategic Planning Function
Corporate strategy teams play an important role in guiding business leaders to make smarter, better and more informed decisions, especially in ...

Code Craft – Embedding C++: Timing Virtual Functions
... compiler just like the standard language types. A subtype inherits the characteristics of its parent type and can use, or not, the member functions ...

Political row over omitting Kerala CM from PM Modi’s function
Kerala chief minister Oommen Chandy on Saturday decided to keep away from Prime Minister Narendra Modi’s function in Kollam in south Kerala after ...

Colorado governor: This Planned Parenthood shooting may be a function of inflammatory rhetoric from bloggers ...
Via Grabien , skip to 4:45 of the clip below for the key bit. I naively thought we were (mostly) done with “climate of hate” stupidity after ...

Surprise: Binge-Watching TV May Cause a Decline in Brain Function
With the second season of Transparent only a few days away, some bad news awaits us: According to a recent study and common sense, probably, ...

Resources last updated: 12/13/2015 11:29:07 PM