Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp.net ¶à×Ö¶ÎÄ£ºý²éѯ´úÂë

¾­³£Óõ½¶à×ֶεÄÄ£ºý²éѯ£¬ÉÏÃæµÄº¯Êý¿ÉÒÔʵÏÖ£¬ÀýÈçstrKeyWordsֵΪ“½Å±¾Ö®¼Ò”ʱ
string strField = "id|className|classAdd";
string strKeyWords = this.tbxKeyWords.Text.Trim();
string strSql = dbexe.searchText("select * from class", strField, strKeyWords);
¾­³£Óõ½¶à×ֶεÄÄ£ºý²éѯ£¬ÉÏÃæµÄº¯Êý¿ÉÒÔʵÏÖ£¬ÀýÈçstrKeyWordsֵΪ“½Å±¾Ö®¼Ò”ʱ£¬¿ÉÒÔÊä³ö£º
select * from class where id like '%½Å±¾Ö®¼Ò%' or className like '%½Å±¾Ö®¼Ò%' or classAdd like '%½Å±¾Ö®¼Ò%'
º¯Êý£º
/// <summary>
/// ¸ù¾Ý¹Ø¼ü×ÖʵÏÖ¶à×Ö¶ÎÄ£ºý²éѯ
/// </summary>
/// <param name="sqlStr">select * from talbe sqlÓï¾ä</param>
/// <param name="sqlText">ÅжÏÓï¾äÌõ¼þ£¬ÊÇÒ»¸öÓÃ|¸ô¿ªµÄ×Ö·û´®</param>
/// <param name="keywords">¹Ø¼ü×Ö</param>
public static string searchText(string strSql, string strField, string keywords)
{
StringBuilder sb = new StringBuilder(strSql);
if (strField != string.Empty)
{
sb.Append(" where ");
string[] arrKey = strField.Split('|');
for (int i = 0; i < arrKey.Length; i++)
{
sb.Append(arrKey[i] + " like '%" + keywords + "%' or ");
}
string str = sb.ToString();
//È¥³ý×îºóÒ»¸ö"or"
if (str.IndexOf("or") >= 0)
{
return str.Remove(str.LastIndexOf("or"));
}
return str;
}
return strSql;
}
Ïêϸ³ö´¦²Î¿¼£ºhttp://www.jb51.net/article/15251.htm


Ïà¹ØÎĵµ£º

[ASP.NET]ºǫ́ö¾Ù¿Õ¼ä

ÔÚºǫ́ÓÃC#ö¾Ù¿Ø¼þ²»ÏñjavascriptÄÇô¼òµ¥£¬HasControlsÖ»ÄÜ×¥µ½Ö±Êôϼ¶µÄ¿Ø¼þ£¬Èç¹ûÓжà¸ödiv£¬tableǶÌ×£¬¾ÍÒªµÝ¹éÁË
 public static void CloseAllContent(System.Web.UI.Control page,bool bOpen)
    {
        int nPageControls = page.Controls.Count ......

ASP.NET FCKeditor Îı¾±à¼­Æ÷µÄʹÓÃ

ASP.NET FCKeditor Îı¾±à¼­Æ÷µÄʹÓà ¡¾×ª¡¿
ÏÂÔصØÖ·£ºhttp://www.fckeditor.net/download

FCKeditorʹÓÃ
Ò»¡¢ÅäÖÃ
1¡¢ÔÚwww.fckeditor.net
µã»÷Download£¬ÏÂÔØFCKEditor_2.5.1.zipºÍFCKEditor.Net(ASP.NET
Control to easily integrate FCKEditor on .Net Web pages.)
2¡¢Ð½¨Ò»ÏîÄ¿£¬±ÈÈç½ÐFCK¡£½âѹFCKEd ......

Asp.net ¶Ô·¾¶¡°***¡±µÄ·ÃÎʱ»¾Ü¾ø

Asp.netÍøÕ¾·¢²¼µ½IISÉÏ£¬²Ù×÷ÎļþµÄʱºò·¢Éú‘System.UnauthorizedAccessException:¶Ô·¾¶“***”µÄ·ÃÎʱ»¾Ü¾ø’¡£
˵Ã÷ûÓÐÊÚÓèAsp.net¶ÔÎļþµÄд·ÃÎÊȨ£¬ÍøÉÏÕÒÁËÒ»ÏÂ:
ÈôÒªÊÚÓè ASP.NET ¶ÔÎļþµÄд·ÃÎÊȨ£¬ÇëÔÚ×ÊÔ´¹ÜÀíÆ÷ÖÐÓÒ»÷¸ÃÎļþ£¬Ñ¡Ôñ“ÊôÐÔ”£¬È»ºóÑ¡Ôñ“°²È«”Ñ¡Ïî¿ ......

ASP.NETÖÐExcel²Ù×÷ÀàC#°æ

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 Microsoft.Office.Inter ......

asp.netÒ³Ãæ¼ä´«ÖµµÄ9ÖÖ·½Ê½

1. Get(¼´Ê¹ÓÃQueryStringÏÔʽ´«µÝ)
     ·½Ê½£ºÔÚurlºóÃæ¸ú²ÎÊý¡£
     Ìص㣺¼òµ¥¡¢·½±ã¡£
     ȱµã£º×Ö·û´®³¤¶È×Ϊ255¸ö×Ö·û£»Êý¾Ýй©ÔÚurlÖС£
     ÊÊÓÃÊý¾Ý£º¼òµ¥¡¢ÉÙÁ¿¡¢¹Ø¼üµÄÊý¾Ý¡£
     ÊÊÓ÷¶Î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ