• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
我的学习笔记
   首页       联系   管理    订阅  订阅

随笔分类 -  VS2005 控件

站点导航控件TreeView

摘要:1、TreeView 服务器控件的事件 TreeNodeCheckChange 当TreeView服务器控件的复选框在向服务器的两次发送过程之间有所更改时发生 SelectedNodeChange 当选择TreeView服务器控件中的节点时发生 TreeNodeExpanded 当展开TreeView服务器控件中的节点时发生 TreeNodeCollapsed 当折叠TreeView服务器控件中的节点时发生 TreeNodePoulate 当其PopulateOnDemand属性设置为true的节点在TreeView服务器控件中展开时发生reeView TreeNOdeDataBound 当数据项绑定到TreeView服务器控件中的节点时 阅读全文
posted @ 2008-04-16 13:18 吴有鋆 阅读(824) 评论(0) 推荐(0)
母版页

摘要:public partial class 母版页_Default : System.Web.UI.Page { protected void Page_PreInit(object sender, EventArgs e) //在内容页和母版页合并之前运行的事件 { if (Session["aa"] != null) //虚判断 { ... 阅读全文
posted @ 2008-03-18 18:44 吴有鋆 阅读(491) 评论(0) 推荐(0)
GridView2

摘要:1、镶套(在GridView里镶套BulletedList) private SqlDataReader read(string id) { SqlConnection mycon = new SqlConnection(ConfigurationManager.ConnectionStrings["pubconn"].ToString()); m... 阅读全文
posted @ 2008-03-04 20:48 吴有鋆 阅读(141) 评论(0) 推荐(0)
GridView

摘要:public partial class GridView_GridView3 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { for (int i = 1; i < GridVie... 阅读全文
posted @ 2008-02-20 13:22 吴有鋆 阅读(187) 评论(0) 推荐(0)
控件添加 - 项、刷性

摘要:1、PlaceHolder ph.Controls.Add(hl); 添加控件 2、控件,对象添加自定义属性 Button1.Attributes.Add("onmouseover", "this.styl.backgroundColor='#00ffcc'"); e.Row.Attributes.Add("onmouseover", "... 阅读全文
posted @ 2008-02-01 23:17 吴有鋆 阅读(145) 评论(0) 推荐(0)
DataList

摘要:1、数据绑定(将数据写成一个方法,方便数据绑定) public class db { protected string connstring; private int pagesize; public db() { connstring = ConfigurationManager.ConnectionStrings["pubconn"].Conne... 阅读全文
posted @ 2008-02-01 22:53 吴有鋆 阅读(345) 评论(0) 推荐(0)
Repeater

摘要:模板属性 说明 ItemTemplate 包含要为数据源中每个数据项都要呈现一次的HTML元素和控件。 AlternatingItemTemplate 包... 阅读全文
posted @ 2008-01-13 21:52 吴有鋆 阅读(690) 评论(0) 推荐(0)
table-表格

摘要:动态建立表格 protected void Button1_Click(object sender, EventArgs e) { int r = int.Parse(DropDownList1.SelectedValue); int c = int.Parse(DropDownList2.SelectedValue); fo... 阅读全文
posted @ 2008-01-12 16:38 吴有鋆 阅读(177) 评论(0) 推荐(0)
Panel--容器

摘要:protected void Button1_Click(object sender, EventArgs e) { int a = int.Parse(DropDownList1.SelectedValue); for (int i = 1; i "; Panel1.Controls.Add(lb); } ... 阅读全文
posted @ 2008-01-11 16:32 吴有鋆 阅读(236) 评论(0) 推荐(0)
MultiView

摘要:protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { MultiView1.ActiveViewIndex = Convert.ToInt32(DropDownList1.SelectedValue)-1; } ... 阅读全文
posted @ 2008-01-07 19:53 吴有鋆 阅读(326) 评论(0) 推荐(0)
ListBox--列表框

摘要:SelectionMode 组件中条目的选择类型:单选,多选 Row 此组件显示多少行 Selected 检测条目是否被选中 ... 阅读全文
posted @ 2007-12-27 13:50 吴有鋆 阅读(272) 评论(0) 推荐(0)
Literal 控件 Mode:Transform,PassThrough,Encode

摘要:Transform: [fdsf](desf);"hahah" PassThrough: [fdsf](desf);"hahah" Encode: [fdsf](desf);"hahah" Lable1: [fdsf](desf);"hahah" Lable2: Server.HtmlEncode [fdsf](desf);"hahah" 阅读全文
posted @ 2007-12-26 23:58 吴有鋆 阅读(372) 评论(0) 推荐(0)
FileUpdate--上传控件

摘要:protected void Button1_Click(object sender, EventArgs e) { string name = FileUpload1.FileName; //上传文件名 string size = FileUpload1.PostedFile.ContentLength.ToString(); //文件大小(字节)... 阅读全文
posted @ 2007-12-25 23:14 吴有鋆 阅读(360) 评论(0) 推荐(0)
DropDownList--下拉菜单

摘要:1、ArrayList数据列表(使用数据列表必须引入using System.Collections命名空间) protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ArrayList arrl = new ArrayList(); ... 阅读全文
posted @ 2007-12-20 20:52 吴有鋆 阅读(204) 评论(0) 推荐(0)
BulletedList---列表

摘要:数据库为数据源,添加value链接 protected void BulletedList2_DataBound(object sender, EventArgs e) { for (int i = 1; i < BulletedList2.Items.Count; i++) { BulletedList2.Items[i].Val... 阅读全文
posted @ 2007-12-19 16:04 吴有鋆 阅读(550) 评论(0) 推荐(0)
AdRotator--广告控件

摘要:AdvertisementFile---包含广告的XML文件 AdRotator1_AdCreated方法,在从Asvertisement中检索到广告后激发 阅读全文
posted @ 2007-12-17 18:25 吴有鋆 阅读(318) 评论(0) 推荐(0)
复选列--chenkboxlist

摘要:更改选定索引后激发 protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e) { int n = cbl1.Items.Count; for (int i = 0; i "); Response.Write(t); ... 阅读全文
posted @ 2007-12-17 17:21 吴有鋆 阅读(199) 评论(0) 推荐(0)
按钮-Button

摘要:按钮添加JaveScript代码 12onmouseover="c=this.style.backgroundColor; this.style.backgroundColor='#00ff99'; this.style.width='150';" 3onmouseout="this.style.backgroundColor=c;this.style.width='93';" Font-Bold="true"/ 阅读全文
posted @ 2007-12-15 20:43 吴有鋆 阅读(198) 评论(0) 推荐(0)

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3