<object id="factory" style="display:none" viewastext classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360"></object><title>呵呵</title>
<input type="button" value="页面设置"
onclick="factory.printing.PageSetup()">
<input type="button" value="打印预览"
onclick="factory.printing.Preview()">
<script>
function window.onload() {
factory.printing.header = "居左显示&b居中显示&b居右显示页码,第&p页/共&P页"
factory.printing.footer = "(自定义页脚)"
factory.printing.leftMargin = 0.75
factory.printing.topMargin = 1.5
factory.printing.rightMargin = 0.75
factory.printing.bottomMargin = 1.5
}
</script>
<input type="button" value="页面设置"
onclick="factory.printing.PageSetup()">
<input type="button" value="打印预览"
onclick="factory.printing.Preview()">
<script>
function window.onload() {
factory.printing.header = "居左显示&b居中显示&b居右显示页码,第&p页/共&P页"
factory.printing.footer = "(自定义页脚)"
factory.printing.leftMargin = 0.75
factory.printing.topMargin = 1.5
factory.printing.rightMargin = 0.75
factory.printing.bottomMargin = 1.5
}
</script>
解决方案 »
- 高分求解!关于mvc1.0示例NerdDinner
- 如何在本地搭建php环境啊 iis需要如何配置呢
- 如何在后台代码插入表格?
- 好久没来坛子了,今天遇到问题,搜索无果,又想到这里了,希望大伙给力
- 郁闷了...大家都来帮帮忙!!!!!!!!!!!
- asp.net生成静态页,有代码最好!多谢了。
- VS2005出了个非常奇怪的问题,无论我新建什么控件都提示找不到。请求帮助!!!!
- 一个frameset的问题?左边一个页面a.aspx,里面是一棵树,右边是一个页面b.aspx
- 菜鸟问题~~~如何将string类型转换成int型,~~~急!,在线等。
- ReportService下划线问题
- 控 訴 滅 絕 人 性 中 國 吃 嬰
- 为什么我在page_load中加入Button.Attributes["onClick"] = "javascript:return confirm('Yes or No?');";有错误呢?
{
HttpContext.Current.Response.AppendHeader("Content-Disposition","attachment;filename=Excel.xls");
HttpContext.Current.Response.Charset ="UTF-8";
HttpContext.Current.Response.ContentEncoding =System.Text.Encoding.Default;
HttpContext.Current.Response.ContentType ="application/ms-excel";//image/JPEG;text/HTML;image/GIF;vnd.ms-excel/msword
ctl.Page.EnableViewState =false;
System.IO.StringWriter tw = new System.IO.StringWriter() ;
System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter (tw);
ctl.RenderControl(hw);
HttpContext.Current.Response.Write(tw.ToString());
HttpContext.Current.Response.End();
}
{
HttpContext.Current.Response.AppendHeader("Content-Disposition","attachment;filename=Excel.xls");
HttpContext.Current.Response.Charset ="UTF-8";
HttpContext.Current.Response.ContentEncoding =System.Text.Encoding.Default;
HttpContext.Current.Response.ContentType ="application/ms-excel";//image/JPEG;text/HTML;image/GIF;vnd.ms-excel/msword
ctl.Page.EnableViewState =false;
System.IO.StringWriter tw = new System.IO.StringWriter() ;
System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter (tw);
ctl.RenderControl(hw);
HttpContext.Current.Response.Write(tw.ToString());
HttpContext.Current.Response.End();
}