上一页 1 ··· 7 8 9 10 11 12 下一页
  2009年6月9日
摘要: 窗体间的数据传递总的来说常用的有三种:(一)(二)利用第三方类传递数据。(三)晚上回来总结。 阅读全文
posted @ 2009-06-09 17:29 sinbad_li 阅读(151) 评论(0) 推荐(0) 编辑
  2009年6月8日
摘要: Tag属性,可以在传递数据的时候保存数据。具体用法如下:建一个主窗体FrmMain和一个frmLogin窗体;新建一个类用于数据传递:using System;using System.Collections.Generic;using System.Text;namespace frmMain{ public class User { private string username; priva... 阅读全文
posted @ 2009-06-08 13:19 sinbad_li 阅读(206) 评论(0) 推荐(0) 编辑
  2009年6月6日
摘要: private void button1_Click(object sender, EventArgs e) { if (set!=false )//set为声明的全局变量。 { for (int j = 0; j < checkedListBox1.Items.Count; j++) { checkedListBox1.SetItemChecked(j, true); } set = f... 阅读全文
posted @ 2009-06-06 13:15 sinbad_li 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 在Form1中添加一个控件。private void button3_Click(object sender, EventArgs e) { Form2 frm = new Form2(); frm .xx=xxx;//xx为Form2中的属性,xxx为Form1中的数据(可以是字符串,数组,数据集)。 frm.ShowDialog(); }Form2中添加一个字段和一个属性 privatex... 阅读全文
posted @ 2009-06-06 13:09 sinbad_li 阅读(185) 评论(0) 推荐(0) 编辑
摘要: c# checklistbox的用法 2007-10-30 16:001、添加项:checkedListBox1.Items.Add("蓝色");checkedListBox1.Items.Add("红色");checkedListBox1.Items.Add("黄色");2、判断第0项是否选中if (checkedListBox1.GetItemChecked(0))3、设置第0项是否选中che... 阅读全文
posted @ 2009-06-06 09:38 sinbad_li 阅读(1611) 评论(0) 推荐(0) 编辑
  2009年5月28日
摘要: static void Reverse(int[] array, int begin, int end){ ...}   Reverse方法的作用是将array数组中,从begin下标到end下标之间的元素反序一下,如一个数组初始值是[1, 2, 3, 4, 5, 6],begin为1,end为4,那么当调用了Reverse之后,array数组中的元素便依次成为[1, 5, 4, 3, 2, 6]... 阅读全文
posted @ 2009-05-28 11:43 sinbad_li 阅读(240) 评论(0) 推荐(0) 编辑
  2009年5月24日
摘要: 跨网页公布(Cross.Page Postiing)1. 跨网页POST: WebForm1.aspx文件: <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Button" PostBackUrl="~/WebF... 阅读全文
posted @ 2009-05-24 16:28 sinbad_li 阅读(434) 评论(0) 推荐(0) 编辑
摘要: ASP.NET中页面传值 一、目前在ASP.NET中页面传值共有这么几种方式:1、表单提交, <form action= "target.aspx" method = "post" name = "form1"><input name = "param1" value = "1111"/><input name = "param2" value = "2222"/&g... 阅读全文
posted @ 2009-05-24 15:54 sinbad_li 阅读(290) 评论(0) 推荐(0) 编辑
摘要: Control.FindControl (String):在当前的命名容器中搜索带指定 id 参数的服务器控件。(有点类似javascript中的getElementById(string))简单的例子:<form id="form1" runat="server"> <div> <asp:TextBox ID="TextBox1" runat="server">... 阅读全文
posted @ 2009-05-24 15:48 sinbad_li 阅读(3868) 评论(2) 推荐(2) 编辑
  2009年5月21日
摘要: 26.3 验 证 控 件用户在网页的控件上面输入数据,往往需要对其进行有效性验证,这样可以及时检查用户提交的数据是否合法,同时可以减少服务器的负担。26.3.1 限制空字段控件RequiredFieldValidator它用于限制空字段,在页面提交前不允许输入为空。在工具箱中的“验证”一栏中可以找到这个控件,如图26.28所示。下面将通过实例介绍该控件的用法,步骤如下。(1... 阅读全文
posted @ 2009-05-21 21:07 sinbad_li 阅读(2265) 评论(1) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 下一页