在弹出窗口中显示预览?

在弹出窗口中显示预览?

问题描述:

你好朋友,


在弹出窗口中显示预览??

有人可以指导我如何预览弹出窗口吗?

hello friends,


show preview in popup window ??

any one please guide me how i can preview the popup window?

^ ]

http://csharpdotnetfreak.blogspot.com/2011/03/ajax-modalpopupextender-example- aspnet.html [ ^ ]

http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/modalpopup/modalpopup.aspx [ ^ ]

http://www.chrismanciero.com/modalpopupextender.aspx [
http://www.dotnetspider.com/resources/42889-How-show-grid-view-selected-record-AJAX-POP.aspx[^]

http://csharpdotnetfreak.blogspot.com/2011/03/ajax-modalpopupextender-example-aspnet.html[^]

http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/modalpopup/modalpopup.aspx[^]

http://www.chrismanciero.com/modalpopupextender.aspx[^]


如果要预览页面的一部分,请使用此javascript代码.

print_area是您要预览的div的ID.

If you want to preview a part of your page then use this javascript code.

here print_area is id of the div which you want to preview.

function getPrint(print_area)
        {
            //Creating new page
            var pp = window.open();
            //Adding HTML opening tag with <HEAD> … </HEAD> portion
            pp.document.writeln('<HTML><HEAD><title>Print Preview</title><LINK href=Styles.css  type="text/css" rel="stylesheet">')
            pp.document.writeln('<LINK href=PrintStyle.css  type="text/css" rel="stylesheet" media="print"><base target="_self"></HEAD>')
            //Adding Body Tag
            pp.document.writeln('<body MS_POSITIONING="GridLayout" bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0">');
            //Adding form Tag
            pp.document.writeln('<form  method="post">');
            //Creating two buttons Print and Close within a table
            pp.document.writeln('<TABLE width=100%><TR><TD></TD></TR><TR><TD align=right><INPUT ID="PRINT" type="button" value="Print" onclick="javascript:location.reload(true);window.print();"><INPUT ID="CLOSE" type="button" value="Close" onclick="window.close();"></TD></TR><TR><TD></TD></TR></TABLE>');
            //Writing print area of the calling page
            pp.document.writeln(document.getElementById(print_area).innerHTML);
            //Ending Tag of </form>, </body> and </HTML>
            pp.document.writeln('</form></body></HTML>');

        }



检查此链接
在ASP.NET中动态创建打印预览页 [



check this link
Creating print preview page dynamically in ASP.NET[^]

sorry if i misunderstood your question.


http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/modalpopup/modalpopup.aspx[^] [
http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/modalpopup/modalpopup.aspx[^][^]
contains sample code fro download...
refer this... :)