Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 10th, 2004, 11:02 AM
Authorized User
 
Join Date: Feb 2004
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default Is there any way I can change the print property

Hi.. friends...

How r u ?

is there any way i can make the defult value of the printing the page to Landscape insted of portrait.
if any body know help me out.

in advance thank you
aashish

Aashish Shah
__________________
Aashish Shah
 
Old March 10th, 2004, 11:37 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

With ASP.NET code or on the printer itself?

 
Old March 10th, 2004, 11:56 AM
Authorized User
 
Join Date: Feb 2004
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

with asp.net code....


Aashish Shah
 
Old March 10th, 2004, 11:59 AM
Authorized User
 
Join Date: Feb 2004
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am using the following code:


 Public Sub Printing()
            try
            Dim pd As New PrintDocument()
            pd.DefaultPageSettings.Landscape = True
            pd.Print()

     Catch ex As Exception
        MessageBox.Show(ex.Message)
    End Try
    End Sub


Aashish Shah
 
Old March 10th, 2004, 02:50 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The layout settings of the printer are at the mercy of the client's machine. I don't think there is anything you can do to modify those from ASP.NET code, or any server-side code for that matter.
 
Old March 10th, 2004, 04:05 PM
Authorized User
 
Join Date: Feb 2004
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes we can do it.. but it is not working properly with this .. b'cos I have check on the msdn.com they says that it will work but it is not woking , I think I am making some mistake .. here is the like .. for the referance if you can make it out please guide me..

http://msdn.microsoft.com/library/de...scapetopic.asp

I am sure I am not able to understand the topic compleately or making so silly mistakes ..
If you can make it out just guide me it will be great help for me..
thanks
aashish


Aashish Shah
 
Old March 10th, 2004, 04:43 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Looks like you're missing an important step here.

The classes you are working with need the .NET Framework to run successfully. So, they will work great for a desktop app built with .NET.

However, with ASP.NET the pages are constructed on ta server running the .NET Framework (so far so good). The result of that page is sent to the client. This client may have never heard of the .NET Framework; it could be a text-reader browser running on Unix, or an old version of Netscape on a Mac.

So the bottom line is, the PageSettings does not apply to pages served by ASP.NET; they apply to applications currently running under the Framework.

Does that make sense?

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
change TextBox.BackColor property onFocus event drasko ASP.NET 1.0 and 1.1 Basics 8 January 26th, 2009 12:23 AM
hasmorepages property of print document component ashkumar General .NET 0 July 28th, 2006 10:48 AM
Print and print preview file on the website withou appleLover General .NET 0 February 19th, 2005 02:24 AM
can't change label's property on webForm! goldablasha C# 2 February 14th, 2005 12:26 AM
Change Buttons Enabled property from another frame TappeBoy VS.NET 2002/2003 7 October 25th, 2004 02:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.