Fork me on GitHub
摘要: <%# Eval("Answer").ToString().Length > 100 ? Eval("Answer").ToString().Substring(0, 100) + "..." : Eval("Answer").ToString()%> 阅读全文
posted @ 2013-05-02 14:16 思考的大腿 阅读(149) 评论(0) 推荐(0)
摘要: DataSet ds = wikibll.GetList(7, 1, string.Format(" isshow=1 and AskCountryid={0} ", countryid));AskCountryid在sqlserver2005中是nvarchar(50),但是查询条件中不用加单引号''吗?好神奇!!居然这样写是对的~ 阅读全文
posted @ 2013-05-02 13:56 思考的大腿 阅读(429) 评论(0) 推荐(0)
摘要: string strwhere = " IsShow='0' ";c#里的'0','1'对应sqlserver2005中的False,True 阅读全文
posted @ 2013-04-28 14:28 思考的大腿 阅读(1866) 评论(0) 推荐(0)
摘要: 04|06|07|08|for (int i = 0; i < expert.CountryID.Split('|').Length; i++){for (int j = 0; j < chkCountry.Items.Count; j++){if (expert.CountryID.Split('|')[i] == chkCountry.Items[j].Value){chkCountry.Items[j].Selected = true;}}} 阅读全文
posted @ 2013-04-27 09:36 思考的大腿 阅读(137) 评论(0) 推荐(0)
摘要: using System;using System.Collections;using System.Configuration;using System.Data;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;namespace CSCDF.Web{ public partial class tes... 阅读全文
posted @ 2013-04-26 13:36 思考的大腿 阅读(189) 评论(0) 推荐(0)
摘要: /// <summary> /// 获取记录总数 /// </summary> public int GetRecordCount(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) FROM tb_Expert "); if (strWhere.Trim() != "") { strSq... 阅读全文
posted @ 2013-04-26 10:48 思考的大腿 阅读(357) 评论(0) 推荐(0)
摘要: /// <summary> /// 分页获取数据列表 /// </summary> public DataSet GetList(int PageSize,int PageIndex,string strWhere) { SqlParameter[] parameters = { new SqlParameter("@tblName", SqlDbType.VarChar, 255),//表明 new SqlParameter("@fldNa... 阅读全文
posted @ 2013-04-26 10:47 思考的大腿 阅读(754) 评论(0) 推荐(0)
摘要: CREATE PROCEDURE [dbo].[UP_GetRecordByPage] @tblName varchar(255), -- 表名 @fldName varchar(255), -- 主键字段名 @PageSize int = 10, -- 页尺寸 @PageIndex int = 1, -- 页码 @IsReCount bit = 0, -- 返回记录总数, 非 0 值则返回 @OrderType bit = ... 阅读全文
posted @ 2013-04-26 10:45 思考的大腿 阅读(218) 评论(0) 推荐(0)
摘要: //获取浏览器版本 string s1=Request.ServerVariables["HTTP_USER_AGENT"]; Response.Write(s1); 阅读全文
posted @ 2013-04-17 14:04 思考的大腿 阅读(340) 评论(0) 推荐(0)
摘要: System.Web.HttpContext.Current.Request.ApplicationPath;后面+/ 阅读全文
posted @ 2013-03-26 17:14 思考的大腿 阅读(362) 评论(0) 推荐(0)