摘要: 对于登陆权限控制问题,我认为Session,Cache,Application都可以Asp.net中防止用户重复登录一:这种情况用到了Session,此情况适应于单一账户登陆Ajax调用View Code string strUserId = txtName.Text.ToString(); //将Session转换为Arraylist数组 ArrayList list = Session["GLOBAL_USER_LIST"] as ArrayList; if (list ==null) { list =new A... 阅读全文
posted @ 2011-05-11 18:26 高兴happy 阅读(2030) 评论(8) 推荐(0) 编辑
摘要: 1,加了个参数2. 'null'为空或不是对象: 里面加个defer=true属性试试看,即:3. document.getElementById为null原因: var titab=document.getElementById("titletab");没有取到对象解决办法:1.在错误语句的下面加上alert(titab);调试语句,看看是否有消息框弹出2.如果没有弹出,检查HTML代码中的是否存在"id=titletab"的标签(要仔细哦,一个字母都不能错的)3.如果标签存在,那么考虑代码段的位置问题,切记包含有类似getElemen 阅读全文
posted @ 2011-05-10 00:59 高兴happy 阅读(2824) 评论(1) 推荐(0) 编辑
摘要: ======================================== 阅读全文
posted @ 2011-05-09 12:24 高兴happy 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 如前台绑定的是label和linkbutton按钮protectedvoid LinkBtnDelete_Click(object sender, EventArgs e) { //取得当前点击的LinkButton按钮 LinkButton btn = (LinkButton)sender; //取得当前点击linkbutton按钮的所在行 GridViewRow irow = (GridViewRow)btn.NamingContainer; //在当前点击linkbutton按钮的行找到label ... 阅读全文
posted @ 2011-05-09 09:55 高兴happy 阅读(1412) 评论(0) 推荐(0) 编辑
摘要: View Code staticvoid Main(string[] args) { Console.WriteLine("请输入num1,num2"); int num1 = Convert.ToInt32(Console.ReadLine()); int num2 = Convert.ToInt32(Console.ReadLine()); //获取计算加法服务 MySumServiceMex.WcfServiceClient sum =new client2.MyS... 阅读全文
posted @ 2011-04-28 15:34 高兴happy 阅读(362) 评论(0) 推荐(0) 编辑
摘要: wcf传输地址分为HTTP,TCP,Peer network(对等网)和MSMQ地址通常采用的格式为:[基地址]/[可选的URL]基地址通常的格式为;[传输协议]://[机器名或者域名][:可选端口]可以讲地址http://localhost:8001读作:"采用HTTP协议访问loaclhost机器,并在8001端口等待调用"如果URL为http://localhost:8001/MyService,则读作“采用HTTP协议访问localhost机器。MyService服务在端口8001等待调用”简单例子如下:添加wcf文件DService1添加using System. 阅读全文
posted @ 2011-04-28 15:14 高兴happy 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 首先建立一个winform项目,再在上面拖一个webBrowser控件,和一个button按钮解析product类首先要先将类名和字段上添加XmlRootAttribute和字段属性上添加XmlElementAttribute以标示期可以被解析View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Xml.Serialization;namespace formSerial{ [XmlRootAttribute] public c... 阅读全文
posted @ 2011-04-26 15:33 高兴happy 阅读(303) 评论(0) 推荐(0) 编辑
摘要: DataGride排序首先拖入DataGride控件现在前台拖入隐含控件设定排序字段然后再启用SortCommand事件View Code //排序privatevoid Dg_Directory_SortCommand(object source, System.Web.UI.WebControls.DataGridSortCommandEventArgs e) { CommMethod.DataGridSort(e.SortExpression, sortfield); this.sortval.Value = e.SortExpr... 阅读全文
posted @ 2011-04-20 16:42 高兴happy 阅读(321) 评论(0) 推荐(0) 编辑
摘要: Web config配置连接字符串 public static DataSet(string Sql) { using(SqlConnection conn=new SqlConnection(ConfigurationManager.ConnectionStrings["DBName"].ConnectionString)) { conn.Open(); using(SqlCommand cmd=conn.CreateCommand()) { cmd.CommandText... 阅读全文
posted @ 2011-04-18 12:16 高兴happy 阅读(492) 评论(0) 推荐(0) 编辑
摘要: ALTER function [dbo].[f_split](@SourceSql varchar(8000),@StrSeprate varchar(10))returns @temp table(a varchar(100))--实现split功能 的函数as begindeclare @i intset @SourceSql=rtrim(ltrim(@SourceSql))set @i=charindex(@StrSeprate,@SourceSql)while @i>=1begininsert @temp values(left(@SourceSql,@i-1))set @Sou 阅读全文
posted @ 2011-04-15 11:52 高兴happy 阅读(311) 评论(0) 推荐(0) 编辑