易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net导出到excel

   导出到excel的方法有多种,比较常见的是直接导出到EXCEL,还有就是先将页面的数据写到磁盘文件,之后直接再打开文件,另外还有就
是借助第三方的控件。
前段时间写的导出数据到excel在excel2003中正常而在excel2007中数据乱码,今天了解到原来是Response.ContentType = "application/ms-excel";导致的,改为Response.ContentType = "application/vnd.ms-excel";正常
public partial class Manager_ExportOrder : ShopOrderBase
{
    #region 事件
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.btnSubmit.Visible = true;
            this.btnDelete.Visible = false;
            BindGridView();
             //显示提示信息
              IList<WfmSysDictionaryItems> lst = GetChildOfFunPurview(Resources.Resource.safeMange);
              if (lst != null || lst.Count > 0)
              {
                  if (lst.Count == 1 && lst[0].SiName.Contains("一个月"))
                  {
                      lblShow.Text = "以下数据是上个月之前的所有订单";
                  }
        


相关文档:

ASP.NET GridView的使用详解


这是要实现的功能:
第一步:拖入GridView控件 并且完成查询所有数据的方法 通过this.GridView1.DataSource 获取集合数据   GridView1.DataBind() 绑定数据
第二步:实现全选功能
1. 页面代码:
代码
 <asp:TemplateField HeaderText="全选">
       &nbs ......

asp.net mvc 2.0部署

IIS 7
IIS7自身有对MVC的支持,部署方法同其他web application基本相同,需要注意的是,mvc 2.0 application在Handler Mappings里面会有MvcHttpHandler,如图:
我使用的是.net 4.0,我看了其他.net 2.0 的web appliation下的Handler Mappings都没有这个handler maping。
注意:.net 3.5以下(包括)的web application p ......

ASP.NET弹出确认窗口

在ASP.NET 1.1中,要做1个弹出的确认对话框的话,一般是在服务端的代码中这样写:
private void Page_Load(object sender, System.EventArgs e)
{
    btnClick.Attributes.Add("onclick", "return confirm('Are you sure?');");
    // Button1.Attributes["OnClick"] = "return conf ......

ASP.NET使用无Cookie的表单认证票据

ASP.NET
使用无Cookie的表单认证票据
默认情况下,forms authentication system将决定是将票据存储在cookies
collection里还是插入用户访问页面的URL里。所有主流的桌面浏览器,比如Internet
Explorer,Firefox,Opera,或Safari都支持cookies,但并非所有的移动设备都支持。
forms authentication system使用何种co ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号