Showing posts with label dear. Show all posts
Showing posts with label dear. Show all posts

Monday, March 26, 2012

Please help - how to create a Printer Friendly web page...

Dear Experts,
I've got a trouble problem that I need your help. The scenario is the
following:

1) I need to add a "Print" button to my web page;
2) by clicking this button, the web page should be able to print out a
well-formatted web page (printer friendly ). That means, I need to adjust the
printing margins (left, top, right, bottom) programmatically.

I really have no idea on how to achieve this but I know this is a very
typical scenario. Could you please give me some advices? Please help.

Thanks a lot.
TiggerAs long as the targetted browser is IE >= 5 you can use the onbeforeprint
and on afterprint events in javascript
(I found this out yeterday)
I wrote the code below to hide a print button and decrease the width when
the document is printed
Hope this helps,
mortb

<head>
<script language="javascript">
var originalWidth;
function window.onbeforeprint()
{
originalWidth = document.getElementById('_tblResult').style.width;
document.getElementById('_tblResult').style.width = '625px';
document.getElementById('_btnPrint').style.display = 'none';
}
function window.onafterprint()
{
document.getElementById('_tblResult').style.width = originalWidth;
document.getElementById('_btnPrint').style.display = 'inline';
}
</script>
</HEAD
"Tigger" <Tigger@.discussions.microsoft.com> wrote in message
news:C2D9F1F1-954D-448A-A201-BAAA332C866E@.microsoft.com...
> Dear Experts,
> I've got a trouble problem that I need your help. The scenario is the
> following:
> 1) I need to add a "Print" button to my web page;
> 2) by clicking this button, the web page should be able to print out a
> well-formatted web page (printer friendly ). That means, I need to adjust
> the
> printing margins (left, top, right, bottom) programmatically.
> I really have no idea on how to achieve this but I know this is a very
> typical scenario. Could you please give me some advices? Please help.
> Thanks a lot.
> Tigger
>
Use a media-specific print stylesheet.
For example, try slapping this in a file called print.css
@.page { 0.75in; }
And putting this line in your HTML
<link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=print.css" media="print"
At this point, you should be able to print from your browser normally. If
you need to initiate printing from a button, you should be able to do
something like this:
<input type="button" value="Print me!" onclick="window.print()"
This article might give you some ideas on other things you can do with this
techinque: http://www.alistapart.com/articles/goingtoprint/
And there's always the CSS reference: http://www.w3.org/TR/CSS21/

"Tigger" wrote:

> Dear Experts,
> I've got a trouble problem that I need your help. The scenario is the
> following:
> 1) I need to add a "Print" button to my web page;
> 2) by clicking this button, the web page should be able to print out a
> well-formatted web page (printer friendly ). That means, I need to adjust the
> printing margins (left, top, right, bottom) programmatically.
> I really have no idea on how to achieve this but I know this is a very
> typical scenario. Could you please give me some advices? Please help.
> Thanks a lot.
> Tigger
>
>

Please help - how to create a Printer Friendly web page...

Dear Experts,
I've got a trouble problem that I need your help. The scenario is the
following:
1) I need to add a "Print" button to my web page;
2) by clicking this button, the web page should be able to print out a
well-formatted web page (printer friendly ). That means, I need to adjust th
e
printing margins (left, top, right, bottom) programmatically.
I really have no idea on how to achieve this but I know this is a very
typical scenario. Could you please give me some advices? Please help.
Thanks a lot.
TiggerAs long as the targetted browser is IE >= 5 you can use the onbeforeprint
and on afterprint events in javascript
(I found this out yeterday)
I wrote the code below to hide a print button and decrease the width when
the document is printed
Hope this helps,
mortb
<head>
<script language="javascript">
var originalWidth;
function window.onbeforeprint()
{
originalWidth = document.getElementById('_tblResult').style.width;
document.getElementById('_tblResult').style.width = '625px';
document.getElementById('_btnPrint').style.display = 'none';
}
function window.onafterprint()
{
document.getElementById('_tblResult').style.width = originalWidth;
document.getElementById('_btnPrint').style.display = 'inline';
}
</script>
</HEAD>
"Tigger" <Tigger@.discussions.microsoft.com> wrote in message
news:C2D9F1F1-954D-448A-A201-BAAA332C866E@.microsoft.com...
> Dear Experts,
> I've got a trouble problem that I need your help. The scenario is the
> following:
> 1) I need to add a "Print" button to my web page;
> 2) by clicking this button, the web page should be able to print out a
> well-formatted web page (printer friendly ). That means, I need to adjust
> the
> printing margins (left, top, right, bottom) programmatically.
> I really have no idea on how to achieve this but I know this is a very
> typical scenario. Could you please give me some advices? Please help.
> Thanks a lot.
> Tigger
>
>
Use a media-specific print stylesheet.
For example, try slapping this in a file called print.css
@.page { 0.75in; }
And putting this line in your HTML
<link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=print.css" media="print">
At this point, you should be able to print from your browser normally. If
you need to initiate printing from a button, you should be able to do
something like this:
<input type="button" value="Print me!" onclick="window.print()">
This article might give you some ideas on other things you can do with this
techinque: http://www.alistapart.com/articles/goingtoprint/
And there's always the CSS reference: http://www.w3.org/TR/CSS21/
"Tigger" wrote:

> Dear Experts,
> I've got a trouble problem that I need your help. The scenario is the
> following:
> 1) I need to add a "Print" button to my web page;
> 2) by clicking this button, the web page should be able to print out a
> well-formatted web page (printer friendly ). That means, I need to adjust
the
> printing margins (left, top, right, bottom) programmatically.
> I really have no idea on how to achieve this but I know this is a very
> typical scenario. Could you please give me some advices? Please help.
> Thanks a lot.
> Tigger
>
>

Saturday, March 24, 2012

PLEASE HELP ASP.NET PROBLEM

Dear All,

I have encountered a very strange problem with DataBinding a repeater.

1. I have a DataTable that has 100 record (3 columns with number only and
the records count is also confirmed)
2.I have created a proper Repeater
3. The Repeater has a databinding with the datatable
4.When I databind() the repeater, only some of the records get rendered and
the remaining aspx file ends up incomplete! it is as though the databinding
breaks at some point resulting the page not being parsed correctly.
5. I am using .NET 1.1 with spk

Has anyone ever seen something like this?Can you provide more info or where the error is existing in your code.
Patrick

"Yet another C# coder" <gevik@.hotmail.com> wrote in message
news:O$9ScPKuFHA.3236@.TK2MSFTNGP14.phx.gbl...
> Dear All,
> I have encountered a very strange problem with DataBinding a repeater.
> 1. I have a DataTable that has 100 record (3 columns with number only and
> the records count is also confirmed)
> 2.I have created a proper Repeater
> 3. The Repeater has a databinding with the datatable
> 4.When I databind() the repeater, only some of the records get rendered
and
> the remaining aspx file ends up incomplete! it is as though the
databinding
> breaks at some point resulting the page not being parsed correctly.
> 5. I am using .NET 1.1 with spk
> Has anyone ever seen something like this?

PLEASE HELP ASP.NET PROBLEM

Dear All,
I have encountered a very strange problem with DataBinding a repeater.
1. I have a DataTable that has 100 record (3 columns with number only and
the records count is also confirmed)
2.I have created a proper Repeater
3. The Repeater has a databinding with the datatable
4.When I databind() the repeater, only some of the records get rendered and
the remaining aspx file ends up incomplete! it is as though the databinding
breaks at some point resulting the page not being parsed correctly.
5. I am using .NET 1.1 with spk
Has anyone ever seen something like this?Can you provide more info or where the error is existing in your code.
Patrick
"Yet another C# coder" <gevik@.hotmail.com> wrote in message
news:O$9ScPKuFHA.3236@.TK2MSFTNGP14.phx.gbl...
> Dear All,
> I have encountered a very strange problem with DataBinding a repeater.
> 1. I have a DataTable that has 100 record (3 columns with number only and
> the records count is also confirmed)
> 2.I have created a proper Repeater
> 3. The Repeater has a databinding with the datatable
> 4.When I databind() the repeater, only some of the records get rendered
and
> the remaining aspx file ends up incomplete! it is as though the
databinding
> breaks at some point resulting the page not being parsed correctly.
> 5. I am using .NET 1.1 with spk
> Has anyone ever seen something like this?
>

Friday, March 16, 2012

please help me with ASP.net problems

Dear Sirs,

I'm a Vietnamese student. I've been developing a website for my school; as not a professional web programer, I have some problems using the language ASP.net. I'd be grapeful if you'd help me to solve some of the following troubles:

- I use a tool on left-hand toolbar called "file field" to upload a picture to a folder on the web server but I don't know what commands to be used to delete it from this folder?

- I call a confirmation box (in VB language) but I receive an error message: "It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode"?

- What commands to hide or disable the back & next buttons in web browser?

Thank you for your help !

Luong trung Kien

Wellcome on asp.net forums.....
Here are your answers
1 - u use Input/output libarary , here is the reference ... http://aspnet.4guysfromrolla.com/articles/051802-1.aspx
2 - In Windows base application use, MsgBox(Prompt, Buttons,Title)
and in Web based application used Javascript message box
also see this link for reference , http://www.programmersheaven.com/mb/VBNET/161205/161205/readmessage.aspx
3 - simply used this command in code behind, BUTTON_NAME.visible = False (for hide) & BUTTON_NAME.enabled = False (For Disabled), and also u can perform this activity through designer.........

Happy Programming !
Sajjad

Hi,

The answers to your first and second questions are given above.

But for 3) - There is no way of disabling the back/forward button in a web browser, and nor should you try! The back/forward buttons are so important to web browsing that no web application should function without them. Most users on the web rely on the back/forward buttons for navigation - you should think of them as an asset rather than a problem.

Rich

please help me with this problem

Dear all

when i open a new project with Visual Studio.Net 2003,

and choosing to make an asp.net web application project

the following problem happend

please tell me how to overcome this problem

regards,,,

Try this...

Look for and open your IIS (Internet Information Services), in XP it is under Administraive Tools of Control Panel, go to "Default Web Site", right click it, Select "Properties", then click "ASP.Net" tab, change "ASP.Net version" back to 1.1 version.

Hope this solves your problem...Mark as answer if this solves it...Smile


Here's your solution:

Open command prompt, and type"aspnet_regiis -i"



Follow the steps as provided above and make sure that aspnet_regiis.exe you drag drop from the Version 1.1 folder on command prompy then type -i and then press enter then log off or restart you machine. You will find this under your windown direcotry->Microsoft.NET->Framework-v1.1.4322(or the version of dotnet framework)

and also make sure that ASP.NET have all permission on the "Temporary ASP.NET Files" under the version folder and on the folder where your application resides.


Dear all, den2005 when i followed the steps you have mentioned ((Default Web Site", right click it, Select "Properties", then click "ASP.Net" tab)) and right click the Default Web Site, then select Properties i do not find an "ASP.Net" tab the following window has displayed:


den2005 please tell me what to choose??

the_menace

this is the result of applying your advice:

please help me to identify where is the problem.


Using windows explorer, browse through the directory and locate your latest .NET framework version folder.

For instance:

"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe"
Mine is: (actually I got 3.0 and 3.5 also)
C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe
Then just go to your "Start>Run and type in the whole directory as: (with -i)
C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
That should work! 
 


Big thank dear the_menace

finally i can running the program will

and big thank for all of members who are partisipating in helping me