Click here to Skip to main content
16,004,991 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: printing the web page Pin
Suresh Pirsquare23-Feb-07 5:34
Suresh Pirsquare23-Feb-07 5:34 
QuestionOpen a server side document using a client's program Pin
markymark8222-Feb-07 22:35
markymark8222-Feb-07 22:35 
AnswerRe: Open a server side document using a client's program Pin
Paddy Boyd22-Feb-07 22:37
Paddy Boyd22-Feb-07 22:37 
GeneralRe: Open a server side document using a client's program Pin
markymark8222-Feb-07 22:44
markymark8222-Feb-07 22:44 
GeneralRe: Open a server side document using a client's program Pin
markymark8222-Feb-07 23:51
markymark8222-Feb-07 23:51 
Questionneed help for print the webpage content Pin
sPaudel22-Feb-07 22:29
sPaudel22-Feb-07 22:29 
AnswerRe: need help for print the webpage content Pin
Paddy Boyd22-Feb-07 22:39
Paddy Boyd22-Feb-07 22:39 
AnswerRe: need help for print the webpage content Pin
Suresh Pirsquare23-Feb-07 5:38
Suresh Pirsquare23-Feb-07 5:38 
I hope the following article may help u out

Ever wanted to print a DataGrid alone from an ASP.NET Web page? Put an <asp:DataGrid> tag inside the tag does the trick. Here are the steps involved:

1. Enclose the <asp:datagrid></asp:datagrid> tag inside the <div></div> tag.

2. Write a JavaScript function which takes care of printing the content from <div> tag.

Here's an example:


<script language=javascript>
function CallPrint(strid)
{
var prtContent = document.getElementById(strid);
var WinPrint = window.open('','','letf=0,top=0,width=1,height=1,toolbar=0,scrollbars=0,status=0');
WinPrint.document.write(prtContent.innerHTML);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
prtContent.innerHTML=strOldOne;
}
</script>

<div id="divPrint">
<asp:datagrid>
.....
.....
.....
</asp:datagrid>
</div>
<asp:button ID="btnPrint" onClick="javascript:CallPrint('divPrint');" Runat=Server />


Everything Is Possible!
QuestionDropdown List Pin
Member 374156222-Feb-07 22:28
Member 374156222-Feb-07 22:28 
AnswerRe: Dropdown List Pin
Michael Sync22-Feb-07 23:00
Michael Sync22-Feb-07 23:00 
Questionneed help for print the webpage programetically Pin
sPaudel22-Feb-07 22:27
sPaudel22-Feb-07 22:27 
AnswerRe: need help for print the webpage programetically Pin
Hesham Amin22-Feb-07 22:31
Hesham Amin22-Feb-07 22:31 
Questionproblem regarding query string Pin
Member 309559322-Feb-07 22:21
Member 309559322-Feb-07 22:21 
AnswerRe: problem regarding query string Pin
Michael Sync22-Feb-07 22:48
Michael Sync22-Feb-07 22:48 
Questiondatalist in usercontrol and itemcommand not firing?? Pin
Tridip Bhattacharjee22-Feb-07 22:01
professionalTridip Bhattacharjee22-Feb-07 22:01 
AnswerRe: datalist in usercontrol and itemcommand not firing?? Pin
Michael Sync22-Feb-07 22:22
Michael Sync22-Feb-07 22:22 
Questionhttp://localhost not working. Pin
siddisagar22-Feb-07 20:28
siddisagar22-Feb-07 20:28 
AnswerRe: http://localhost not working. Pin
Harini N K22-Feb-07 21:14
Harini N K22-Feb-07 21:14 
AnswerRe: http://localhost not working. Pin
icestatue23-Feb-07 1:55
icestatue23-Feb-07 1:55 
QuestionGridview + asp.net 2.0 + c# Pin
ritu432122-Feb-07 20:20
ritu432122-Feb-07 20:20 
AnswerRe: Gridview + asp.net 2.0 + c# Pin
Tuwing.Sabado22-Feb-07 21:45
Tuwing.Sabado22-Feb-07 21:45 
GeneralRe: Gridview + asp.net 2.0 + c# Pin
badgrs22-Feb-07 23:02
badgrs22-Feb-07 23:02 
QuestionFont size increases on Postback,, Pin
Bobb198222-Feb-07 19:58
Bobb198222-Feb-07 19:58 
AnswerRe: Font size increases on Postback,, Pin
Sandeep Akhare22-Feb-07 21:29
Sandeep Akhare22-Feb-07 21:29 
AnswerRe: Font size increases on Postback,, Pin
Harini N K22-Feb-07 21:32
Harini N K22-Feb-07 21:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.