摘要:
using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.IO;public partial class _Default : System.Web.UI.Page{protec 阅读全文
摘要:
1、首先设置datagrid属性的idField主键,这里假如为id。2、建立一个全局的javascript数组var checkedItems = [],用来存放选中checkbox的值。3、核心方法,addcheckItem()、removeAllItem(rows)、removeSingleItem(rowIndex, rowData)当选中或者取消checkbox时触发 用来将checkbox的主键值保存在checkedItems数组,或者从数组中删除对应的id值,findCheckedItem(ID)这个函数用来查找数组中 是否存在checkbox的值,存在则返回id值,不存在则.. 阅读全文
摘要:
varHidArray=newArray();//把所有的hid放到HidArraySetSettlement(0);functionSetSettlement(index){if(index<HidArray.length){varid=HidArray[index];$("#"+id).html("正在执行.........");$.ajax({type:"GET",url:"xxxxx.ashx?id="+id,cache:false,dataType:"text", async: 阅读全文
摘要:
public static string GetJosnValue(string json, string key) { string result = string.Empty; if (!string.IsNullOrEmpty(json)) { key = "\"" + key.Trim('"') + "\""; int index = json.IndexOf(key) + key.Length + 1; if (i... 阅读全文
摘要:
$.ajax({ type: "post", url: "?action=DownLoadExcel", data:"table='"+3+"'", beforeSend: function (XMLHttpRequest) { }, success: function (data, textStatus) { alert(data); }, complete: function (XMLHttpRequest, textStatus) { }, error: function () { } }); 阅读全文
摘要:
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 阅读全文
摘要:
SELECT * FROM [bookinfo] WHERE addtime> dateadd(month, - 1, getdate()) 阅读全文
摘要:
List<int>list1=newList<int>();list1.Add(1);list1.Add(2);list1.Add(3);List<int>list2=newList<int>();list2.Add(3);list2.Add(4);list2.Add(5);//得到的结果是4,5即减去了相同的元素。List<int>list3=list2.Except(list1).ToList();foreach(intiinlist3){MessageBox.Show(i.ToString());}合并两个数组,并去掉重复元素, 阅读全文
摘要:
搜索网络,发现C#通常有三种方法获取网页内容,使用WebClient、WebBrowser或者HttpWebRequest/HttpWebResponse。。。方法一:使用WebClient (引用自:http://fbljava.blog.163.com/blog/static/265211742008712105145244/)static void Main(string[] args){ try { WebClient MyWebClient = new WebClient(); MyWebClient.Credentials = CredentialCache.DefaultCre. 阅读全文
摘要:
XML/HTML code?123456789101112131415161718192021222324252627282930313233343536<htmlxmlns="http://www.w3.org/1999/xhtml"> <headrunat="server"> <title>无标题页</title> <scripttype="text/javascript"src="js/jquery-1.3.2.min.js"></script 阅读全文