G
Guest
I was wondering how do you print just part of a webform in asp.net -- like
just printing the contents of a textbox or label. I know that it will
involve javascript, but I cannot get the javascript function to work.
Basically, this is the scenario ---
A simple web page with a search form. User enters search value, and a
datagrid displays what the search returns with a template column to link to
the details of each record found. Template column link brings up a textbox
that displays a long list of text (stored in sql as sqldbtype.text). Then I
have a close button and a print button for just this textbox. What I want to
do is just print what is in the textbox. I have written something for which
it will print, but it opens a new page and pressing back does not take you
back to the form displaying the original textbox.
As an example, in Microsoft's Knowledge Base, when you open one of the
articles, there is a link on the right that says Print this page. You click
it, and it pops up the print dialog box, and then you click Ok, and it prints
just the article --- not all the other stuff on the page. That is what I'd
like to be able to do. But, I do not really care. Just opening a new page
with just the text from the text box in it would be ok with me.
Any help would be much appreciated --- Thanks!!
just printing the contents of a textbox or label. I know that it will
involve javascript, but I cannot get the javascript function to work.
Basically, this is the scenario ---
A simple web page with a search form. User enters search value, and a
datagrid displays what the search returns with a template column to link to
the details of each record found. Template column link brings up a textbox
that displays a long list of text (stored in sql as sqldbtype.text). Then I
have a close button and a print button for just this textbox. What I want to
do is just print what is in the textbox. I have written something for which
it will print, but it opens a new page and pressing back does not take you
back to the form displaying the original textbox.
As an example, in Microsoft's Knowledge Base, when you open one of the
articles, there is a link on the right that says Print this page. You click
it, and it pops up the print dialog box, and then you click Ok, and it prints
just the article --- not all the other stuff on the page. That is what I'd
like to be able to do. But, I do not really care. Just opening a new page
with just the text from the text box in it would be ok with me.
Any help would be much appreciated --- Thanks!!