J
John Kotuby
Hi all,
Again running into problems converting existing ASP to ASP.NET 2 in VB. I am
simply trying to print a portion of the HTML displayed on-screen and not the
entire document. Specifically I just want to print the HTML contained in the
content area of my Masterpage layout, without the user having to click
File/Print in the browser.
I was able to create an Email body from that same content using some
javascript and and the OuterHTML property of the container (which in this
case is a Table with a specific Id). Of course I added the surrounding
<html> and <body> tags before sending the email. Worked just fine.
The ASP program uses frames for printing. One frame allows the user to
select some options which change the printed output in some minor ways. The
2nd frame contains the HTML page content without the Menus, borders, etc.
The first frame also contains a Print button that calls the javascript
code...
<script>
function printIT()
{
window.parent.frames[1].focus()
window.parent.frames[1].print()
}
</script>
Pretty simple stuff really. I've been searching most of the day for a good
article on using frames in .NET and finally found one. The article suggested
placing the frameset in a plain .htm page and then calling the .aspx pages
as the source.
So I create my HTM page and now VS2005 is giving me the error -- Element
"frameset" is not supported. The author clearly states that his method was
used in .NET 2.0. Very frustrating indeed.
Sometimes finding relevant content in MSDN is like locating a needle in a
haystack. It seems like this should be a rather easy task.
So my questions:
1. Can I use frames in such a way as to allow VS to actually accept and
compile the syntax?
2. Does ASP.NET have an easier way to accomplish what I need to do?
Thanks to all for your input.
Again running into problems converting existing ASP to ASP.NET 2 in VB. I am
simply trying to print a portion of the HTML displayed on-screen and not the
entire document. Specifically I just want to print the HTML contained in the
content area of my Masterpage layout, without the user having to click
File/Print in the browser.
I was able to create an Email body from that same content using some
javascript and and the OuterHTML property of the container (which in this
case is a Table with a specific Id). Of course I added the surrounding
<html> and <body> tags before sending the email. Worked just fine.
The ASP program uses frames for printing. One frame allows the user to
select some options which change the printed output in some minor ways. The
2nd frame contains the HTML page content without the Menus, borders, etc.
The first frame also contains a Print button that calls the javascript
code...
<script>
function printIT()
{
window.parent.frames[1].focus()
window.parent.frames[1].print()
}
</script>
Pretty simple stuff really. I've been searching most of the day for a good
article on using frames in .NET and finally found one. The article suggested
placing the frameset in a plain .htm page and then calling the .aspx pages
as the source.
So I create my HTM page and now VS2005 is giving me the error -- Element
"frameset" is not supported. The author clearly states that his method was
used in .NET 2.0. Very frustrating indeed.
Sometimes finding relevant content in MSDN is like locating a needle in a
haystack. It seems like this should be a rather easy task.
So my questions:
1. Can I use frames in such a way as to allow VS to actually accept and
compile the syntax?
2. Does ASP.NET have an easier way to accomplish what I need to do?
Thanks to all for your input.