01 2011 档案

摘要:父窗口弹出子窗口的 button处理事件: private void butDeta_Click(object sender, System.EventArgs e) { Response.Write("<script>window.open('CangkuDetaList.aspx?strMateNo="+ txtMateNo.Text +"&strWaretype="+ ddlWareType.SelectedValue +"','new1','width=750,height=4 阅读全文
posted @ 2011-01-26 14:40 小锋神 阅读(2856) 评论(0) 推荐(0) 编辑
摘要:CREATE PROCEDURE change_product@result varchar(50) output,@product_no varchar(50),@color varchar(50),@product_size varchar(50),@oldcolor varchar(50),@oldproduct_size varchar(50),@stockid int,@oldstockid int,@number int,@users varchar(50),@orderno varchar(50),@memo_product_inout_record text AS declar 阅读全文
posted @ 2011-01-26 13:11 小锋神 阅读(3329) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /& 阅读全文
posted @ 2011-01-25 16:04 小锋神 阅读(6873) 评论(0) 推荐(1) 编辑
摘要:1、admins目录访问时转到admins/login.aspx2、other.aspx访问时转到login.aspx配置文件设置拒绝other.aspx和admins目录,默认登录页面为login.aspx,并设置允许匿名访问admins/login.aspx】<configuration><system.web> <authentication mode="Forms"> <forms loginUrl="login.aspx"> </forms> </authentication&g 阅读全文
posted @ 2011-01-23 23:49 小锋神 阅读(2577) 评论(0) 推荐(1) 编辑
摘要:这两天做一个小项目,需要把用户在注册的时候填入的个人信息保存到Profile中,自然而然的想到要自定义CreateUserWizard控件的创建用户步骤(CreateUserWizardStep),现在把我的实现过程写下来,跟大家探讨一下。 一 . 在web.config中定义Profile字段,设置各字段的allowAnonymous="true"。 <profile enabled="true"> <properties> <group name="address"> <add name= 阅读全文
posted @ 2011-01-22 10:44 小锋神 阅读(1729) 评论(0) 推荐(0) 编辑
摘要:@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns= 阅读全文
posted @ 2011-01-19 11:28 小锋神 阅读(2975) 评论(0) 推荐(0) 编辑
摘要:鼠标经过表格变色样式:<style> table { background-color:#000000; cursor:hand; width:100%; } td { /*设置onmouseover事件*/ onmouseover: expression(onmouseover=function (){this.style.borderColor ='blue';this.style.color='red';this.style.backgroundColor ='yellow'}); /*设置onmouseout事件*/ onmo 阅读全文
posted @ 2011-01-18 16:36 小锋神 阅读(7094) 评论(0) 推荐(0) 编辑
摘要:GridView/DataGrid行单击和双击事件实现代码(转) protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { LoadGridViewProductData(); LoadDataGridProductData(); } } protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { /* 当然可以在这里进行客户端脚本绑定, 但是,我选择在重载页的 Render 方法中处理,因为 1. RowD 阅读全文
posted @ 2011-01-16 23:29 小锋神 阅读(4366) 评论(0) 推荐(0) 编辑
摘要:如果你想让鼠标移到按钮上更改背景颜色,移出后恢复,一般用以下代码,那能不能把他写成自定义控件呢?<asp:ButtonID="Button1"runat="server"onmouseover="this.style.backgroundColor='DodgerBlue';this.style.color='black';"onmouseout="this.style.backgroundColor='Silver';this.style.color='blac 阅读全文
posted @ 2011-01-16 22:23 小锋神 阅读(1968) 评论(0) 推荐(0) 编辑
摘要:使用MSDNSqlPager这么久以来,对SqlPager已经有了比较深入的了解了,总的说来,SqlPager是一个不错的分页控件。对于一般的需求已经能够很好的满足,而且性能比较好;但是美中不足的地方是:它只能对不重复的列进行排序,一旦你用于排序的列的数据有重复现象那么就将出现漏掉数据的情况;对于这个情况我目前也没有好的解决方法,唯一的办法就是先在查询中进行排序,然后再生成该查询结果的自动编号列,不过这个功能在SqlServer2000下不好做,在SQL2005中到自带该功能!闲话就到此,下面转入正题!以前也对SqlPager进行过一些小的修改,不过还是感觉功能上欠缺了一些!由于一个小项目的需 阅读全文
posted @ 2011-01-16 17:56 小锋神 阅读(914) 评论(0) 推荐(0) 编辑
摘要:设当前页完整地址是:http://www.jb51.net/aaa/bbb.aspx?id=5&name=kelli "http://"是协议名 "www.jb51.net"是域名 "aaa"是站点名 "bbb.aspx"是页面名(文件名) "id=5&name=kelli"是参数 【1】获取 完整url (协议名+域名+站点名+文件名+参数) string url=Request.Url.ToString(); url= http://www.jb51.net/aaa/bbb. 阅读全文
posted @ 2011-01-14 15:37 小锋神 阅读(808) 评论(1) 推荐(0) 编辑
摘要:由于项目需求, 要实现 DropDownList 选项背景, 在网上找了很久, 还是没有找到合意的,可能因 ListItem 它不对 Attributes 解析, 要么就重写 DropDownList 的 RenderContents 方法等.并且还要处理 ViewStatus .或是将 DropDownList 改为 HtmlSelect 但要改的比较多所以暂时放弃.用 CSS Style 吧, 突然想到用Style 结合 Expression 功能十分强大, 没白费力气, 试了很久, 终于得想要的结果.为按要求为不同的的选项设置不同的样式.<style>/**//*为前三项设置 阅读全文
posted @ 2011-01-14 09:34 小锋神 阅读(550) 评论(0) 推荐(0) 编辑
摘要:<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" OnRowEditing="GridView1_RowEditing" OnRowD 阅读全文
posted @ 2011-01-07 13:35 小锋神 阅读(3742) 评论(0) 推荐(0) 编辑
摘要:public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GridView1.DataSource = BuildGridViewDataSource(); GridView1.DataBind(); } SetGridViewEditRow(); } private void SetGridViewEditRow() { if (H_EditRowIndex.Value != "" 阅读全文
posted @ 2011-01-07 13:33 小锋神 阅读(2419) 评论(0) 推荐(0) 编辑
摘要:开启 MySQL 的远程登陆帐号有两大步:1、确定服务器上的防火墙没有阻止 3306 端口。MySQL 默认的端口是 3306 ,需要确定防火墙没有阻止 3306 端口,否则远程是无法通过 3306 端口连接到 MySQL 的。如果您在安装 MySQL 时指定了其他端口,请在防火墙中开启您指定的 MySQL 使用的端口号。如果不知道怎样设置您的服务器上的防火墙,请向您的服务器管理员咨询。2、增加允许远程连接 MySQL 用户并授权。1)首先以 root 帐户登陆 MySQL 在 Windows 主机中点击开始菜单,运行,输入“cmd”,进入控制台,MySQL 的 bin 目录下,然后输入下面的 阅读全文
posted @ 2011-01-07 10:13 小锋神 阅读(365) 评论(0) 推荐(0) 编辑
摘要:--aspx页面添加AllowSorting="True" AutoGenerateColumns="false" SortExpression="f_start_date"<asp:GridView ID="GridView1" runat="server" GridLines="Both" Width="97%" Font-Size="12px" AutoGenerateColumns="false" Al 阅读全文
posted @ 2011-01-06 23:38 小锋神 阅读(828) 评论(0) 推荐(0) 编辑
摘要:这个方法生成的EXECL很正常 protected void Button1_Click(object sender, EventArgs e) { //Export("application/ms-excel", "库存对照表.xls"); Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=FileName.xls"); Response.Charset = "gb2312"; Re 阅读全文
posted @ 2011-01-06 09:50 小锋神 阅读(816) 评论(0) 推荐(0) 编辑
摘要:用DirectoryInfo搜索文件夹时过滤隐藏文件夹2009-07-04 11:50用DirectoryInfo.GetDirectories();搜索文件夹的时候。总是连隐藏的也搜索出来。有的时候我不需要连隐藏的文件夹也搜索出来。而且一般情况下隐藏文件夹都是不允许访问的多。要过滤掉隐藏文件夹。可以这样做:DirectoryInfo di = new DirectoryInfo(搜索的路径); //实例化DirectoryInfoDirectoryInfo[] dir = di.GetDirectories(); //使用GetDirectories方法获取文件夹信息foreach (Dir 阅读全文
posted @ 2011-01-03 09:22 小锋神 阅读(2671) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示