asp.net数据导出到word
我觉得这个文章不能算我的原创,因为代码也是我从别的地方找到的,而且我在网上查了,基本上都是这套代码。
通用的把数据倒进word或者excel。这里的导入excel和我之前的那篇文章中的方法是不一样的。
代码如下:
aspx页面中:
<form id="form1" runat="server">
<div>
<table align="center" cellpadding="0" cellspacing="0" border="0" runat="server" id="table1">
<tr>
<td align="center">
<!-- 其实这俩个Button是一样的 ->
<asp:Button ID="cmdOpen" runat="server" Text="在线打开" CommandName="open" OnCommand="Button_Click" />
<asp:Button ID="cmdSave" runat="server" Text="本地保存" CommandName="save" OnCommand="Button_Click" />
<asp:DropDownList ID="listType" runat="server" >
<asp:ListItem Value="excel">Excel</asp:ListItem>
 
相关文档:
下载页面:
<a href="download.ashx?url=<%=Server.UrlEncode("说明.txt")%>">下载</a>
------------------------------------------------------------------------------
download.ashx
<%@ WebHandler Language="C#" Class="download" %>
using System;
using System.Web;
public ......
1.弹出对话框.
a. 弹出对话框:
C# codeClientScript.RegisterStartupScript(this.GetType(), "",
"<script>window.alert('该会员没有提交申请,请重新提交!')</script>");
b.转向指定页面
C# code Response.Write("
<script>window.location='http://www. ......
方法一:
新建一个页面然后在页面拖一个GridView控件在属性框中设置GridView控件的AllowPaing属性为True 然后再设置GridView的PageSize属性,源文件如下:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames ="classId" CellPadding="5" OnRowDeleting="GridView1_RowDeleting" All ......
ASP.NET实现自适应图片大小的弹出窗口
在最近的项目中,遇到一个问题,要实现这样的效果:
点pic_small.Aspx页面的缩略图后弹出pic_all.aspx页面,pic_all.aspx页面的大小要根据图片大小自动调整,而且要有图片的说明信息,还可以点上一幅和下一幅等进行翻页。
实现过程如下:
pic_small.Aspx页面缩略图处的代码为: ......
ASP.net 仿QQ弹出窗口
〔转〕http://hi.baidu.com/liyukun8203/blog/item/d9244dfcdb78e388b901a019.html
最近在做内部管理,需要用到这个东西来提醒,所以就把它做成一个类,直接调用,满方便的.贴一下代码,大家看一下
Code
1 using System;
2 using System.Web;
3 using System.Collections.Generic;
4 using Sy ......