梓骏

导航

2014年1月16日 #

ASP.NET c# textbox 正则表达式 文本框只允许输入数字(验证控件RegularExpressionValidator )

摘要: ASP.NET c# textbox 正则表达式 文本框只允许输入数字(验证控件RegularExpressionValidator ) 阅读全文

posted @ 2014-01-16 13:47 梓骏 阅读(6020) 评论(0) 推荐(0) 编辑

2012年10月15日 #

根据Gridviwe某列的值显示不同效果 空格效果 背景色效果

摘要: if (e.Row.RowType == DataControlRowType.DataRow) { DataRowView row = (DataRowView)e.Row.DataItem;//当前行的数据 //if (e.Row.Cells[1].Text.StartsWith("51"))某列以值开头的 if (e.Row.Cells[1].Text.Length == 4) e.Row.Cells[2].Text = e.Row.Cells[2].Text; if (e.Row.Cells[1].Text.Length == 6) e.Row.Cells[2].T 阅读全文

posted @ 2012-10-15 10:15 梓骏 阅读(223) 评论(0) 推荐(0) 编辑

2012年10月10日 #

DropDownlist的SelectedIndexChanged第一个值怎么无法触发

摘要: string username = this.txtUserName.Value.Trim(); string password = this.txtPassword.Text.Trim(); ////重构登陆方法 DataTable dt = UsersBLL.Select用户职能部门名称(username, password); DDL职能部门名称.DataSource = dt; DDL职能部门名称.DataTextField = "职能部门名称"; DDL职能部门名称.DataValueField = "职能部门名称"; DDL职能部门名称.Da 阅读全文

posted @ 2012-10-10 16:16 梓骏 阅读(296) 评论(0) 推荐(0) 编辑

2012年10月9日 #

ajax使用updatepanel控件激活其他控件的方法

摘要: <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <Triggers> <asp:PostBackTrigger ControlID="btnNew" /> <asp:PostBackTrigger ControlID="btnDelete" /> <asp:PostBackTrigger ControlID="BtnOK" /> <asp:PostBackTrigger Con 阅读全文

posted @ 2012-10-09 11:35 梓骏 阅读(229) 评论(0) 推荐(0) 编辑

2012年9月5日 #

SQL时间格式语句集合

摘要: Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AMSelect CONVERT(varchar(100), GETDATE(), 1): 05/16/06Select CONVERT(varchar(100), GETDATE(), 2): 06.05.16Select CONVERT(varchar(100), GETDATE(), 3): 16/05/06Select CONVERT(varchar(100), GETDATE(), 4): 16.05.06Select CONVERT(varchar(100), G 阅读全文

posted @ 2012-09-05 15:59 梓骏 阅读(313) 评论(0) 推荐(0) 编辑

2012年8月22日 #

Winform数据即时更新 父窗体子窗体即时更新

摘要: 第一种方法:用委托,Form2和Form3是同一组Form2C#代码 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace TestMouseMove { publicdelegatevoid SetVisiableHandler(); public partial class Form2 : ... 阅读全文

posted @ 2012-08-22 14:41 梓骏 阅读(812) 评论(0) 推荐(0) 编辑

使用AutoCompleteExtender实现搜索下拉提示框,读取数据库内容

摘要: 使用AutoCompleteExtender实现搜索下拉提示框,读取数据库内容第一步:建立一个web服务:在所在项目上右键--添加--新建项--添加一个Web 服务 :AutoCompleteService.asmx,该文件位于App_Code下,代码如下using System;using System.Web;using System.Collections;using System.Web.Services;using System.Web.Services.Protocols;using CwayPlatform;using System.Collections.Generic;u.. 阅读全文

posted @ 2012-08-22 08:18 梓骏 阅读(491) 评论(1) 推荐(0) 编辑

2012年8月10日 #

ASP.NET中常用的代码-时间-传值-分页

摘要: 1. 打开新的窗口并传送参数: 传送参数:response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>") 接收参数:string a = Request.QueryString("id");string b = Request.QueryString("id1"); 2.为按钮添加对话框Button1.Attributes.Add(&quo 阅读全文

posted @ 2012-08-10 09:47 梓骏 阅读(378) 评论(0) 推荐(0) 编辑

2012年8月8日 #

devexpress 控件:gridControl常用属性设置

摘要: 1.隐藏最上面的GroupPanel gridView1.OptionsView.ShowGroupPanel=false; 2.得到当前选定记录某字段的值 sValue=Table.Rows[gridView1.FocusedRowHandle][FieldName].ToString();3.数据只读 gridView1.OptionsBehavior.Editable=false;4.不显示MasterDetailView gridView1.OptionsDetail.EnableMasterViewMode=false;5.修改最上面的GroupPanel内容 gridView1.G 阅读全文

posted @ 2012-08-08 22:18 梓骏 阅读(801) 评论(0) 推荐(0) 编辑

2012年8月4日 #

C# 经典算法 冒泡排序法(正序,倒序)

摘要: /// 冒泡排序法 /// </summary> /// <param name="args"></param> static void Main(string[] args) { int[] arr = new int[] { 6, 1, 2, 5, 9, 11, 0, 4, 14 }; int temp = 0; for (int i = 0; i < arr.Length - 1; i++)//外部循环arr的长度 { for (int j = i + 1; j < arr.Length; j++)//比较大 { if 阅读全文

posted @ 2012-08-04 17:41 梓骏 阅读(876) 评论(0) 推荐(0) 编辑