• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
落叶之夏★※★雪惹麗香
博客园    首页    新随笔    联系   管理    订阅  订阅
[置顶] SQL 判斷兩個時間段是否有重疊部分
摘要: 其中 '2016/03/15'是參數DATE, '2016/03/15 19:03'為開始時間, '2016/03/15 19:10'為結束時間, l.empno =:參數-- '9409872' 共分別為4種情況: 阅读全文
posted @ 2016-03-21 15:45 沁梦雪麗 阅读(261) 评论(0) 推荐(0)
[置顶] 字符串处理的的相关用法
摘要: string str = "abc"; 1.字符大小写转化 大写:str.ToUpper(); 小写: str.ToLower(); 2.字符和Ascii码互相转换 Ascii码:byte[] b = Encoding.GetEncoding("unicode").GetBytes(str);字符串 阅读全文
posted @ 2016-02-29 15:24 沁梦雪麗 阅读(144) 评论(0) 推荐(0)
2016年3月14日
C#跨頁面傳值
摘要: 1.querystring的方式:将需要的值直接写到链接的后面,这些内容将直接显示到地址栏中,在传递安全性要求不高的一个或多个值或者是结构简单的值就可以使用这样的方法。如: Response.Redirect( "target.aspx?param1=hello¶m2=hi ")在接收页面可以通过r 阅读全文
posted @ 2016-03-14 14:20 沁梦雪麗 阅读(235) 评论(0) 推荐(0)
2016年3月1日
GridView和CheckBox结合使用
摘要: 1.前台代码<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GridViewCheckbox.aspx.cs" Inherits="GridViewCheckbox" %><!DOCTYPE html PUBLIC "-//W3C//D 阅读全文
posted @ 2016-03-01 16:57 沁梦雪麗 阅读(3863) 评论(0) 推荐(0)
gridview 某一列換行(自動)
摘要: gridview里有一列绑定的数据很长,显示的时候在一行里面显示,页面拉得很宽。原因是连续英文段为一个整体导致的, 在RowDataBound中添加上了一句e.Row.Cells[2].Style.Add("word-break", "break-all")就可以。如果要给所有的列增加此属性:pro 阅读全文
posted @ 2016-03-01 16:55 沁梦雪麗 阅读(202) 评论(0) 推荐(0)
GridView合并表头多重表头
摘要: protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e){ switch (e.Row.RowType) { case DataControlRowType.Header: //第一行表头 TableCell 阅读全文
posted @ 2016-03-01 16:50 沁梦雪麗 阅读(191) 评论(0) 推荐(0)
C# 导出Excel或Word
摘要: /// <summary> /// 导出Excel /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Button1_Click(object sender, Ev 阅读全文
posted @ 2016-03-01 16:40 沁梦雪麗 阅读(292) 评论(0) 推荐(0)
GridView的分页功能?
摘要: 要实现GrdView分页的功能。操作如下: 1、在<<asp:GridView ID=......>后添加,1)、更改GrdView控件的AllowPaging属性为true。2)、更改GrdView控件的PageSize属性为 任意数值(默认为10)3)、更改GrdView控件的PageSetti 阅读全文
posted @ 2016-03-01 16:10 沁梦雪麗 阅读(225) 评论(0) 推荐(0)
如何在GridView中判断Radio被选中?
摘要: 在GridView模版列中设置如下 1 <asp:TemplateField HeaderText="删除"> 2 <ItemTemplate> 3 <asp:CheckBox ID="CheckBox1" runat="server" /> 4 </ItemTemplate> 5 </asp:Te 阅读全文
posted @ 2016-03-01 16:05 沁梦雪麗 阅读(271) 评论(0) 推荐(0)
GridView無數據時,顯示表頭
摘要: DataTable dtTmp { get { if (ViewState["dtTmp"] == null) { return null; } return ViewState["dtTmp"] as DataTable; } set { ViewState["dtTmp"] = value; } 阅读全文
posted @ 2016-03-01 11:00 沁梦雪麗 阅读(205) 评论(0) 推荐(0)
下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3