ASP.NET ´Óxml¶Á³öÊý¾ÝʱµÄ·ÖÒ³·½·¨
public string GetPage(int page, int pages, string url)
{
if (pages == 0)
{
pages = 1;
}
string sb0 = "";
int n1 = 0, n2 = 0;
n1 = page - 5 <= 0 ? 1 : page - 5;
n2 = page + 5 > pages ? pages : page + 5;
if (n2 <= 9)
n2 = 10;
if (n2 > pages)
n2 = pages;
if (n2 - n1 < 9)
n1 = n2 - 9 < 1 ? 1 : n2 - 9;
sb0 += "¡¡<a href=\"" + url + 1 + ".html\">Ê×Ò³</a>¡¡";
sb0 += "<a href=\"" + url + (page - 1 <= 0 ? 1 : page - 1)
+ ".html\">ÉÏÒ»Ò³</a>¡¡";
//ÅжÏÊÇ·ñÊǵ±Ç°Ò³
for (; n1 <= n2; n1++)
&
Ïà¹ØÎĵµ£º
¾³£Óõ½¶à×ֶεÄÄ£ºý²éѯ£¬ÉÏÃæµÄº¯Êý¿ÉÒÔʵÏÖ£¬ÀýÈçstrKeyWordsֵΪ“½Å±¾Ö®¼Ò”ʱ
string strField = "id|className|classAdd";
string strKeyWords = this.tbxKeyWords.Text.Trim();
string strSql = dbexe.searchText("select * from class", strField, strKeyWords);
¾³£Óõ½¶à×ֶεÄÄ£ºý²éѯ£¬ÉÏà ......
WebService£¬¼òµ¥Ò»µã˵£¬¾ÍÊǸö¶ÔÍâµÄ½Ó¿Ú,ÀïÃæÓк¯Êý¿É¹©Íⲿ¿Í»§µ÷ÓÃ(×¢Òâ:ÀïÃæͬÑùÓпͻ§²»¿Éµ÷Óõĺ¯Êý).¼ÙÈôÎÒÃÇÊÇ·þÎñ¶Ë,ÎÒÃÇдºÃÁ˸öwebservice,È»ºó°ÑËü¸øÁË¿Í»§(ͬʱÎÒÃǸøÁËËûÃǵ÷ÓùæÔò),¿Í»§¾Í¿ÉÒÔÔÚ´Ó·þÎñ¶Ë»ñÈ¡ÐÅϢʱ´¦ÓÚÒ»¸öÏà¶Ô͸Ã÷µÄ״̬.¼´ÊÇ¿Í»§²»Á˽â(Ò²²»ÐèÒª)Æä¹ý³Ì,ËûÃÇÖ»»ñÈ¡Êý¾Ý. Webservice´«µ ......
Ò»°ãxmlÖÐÈç¹ûº¬ÓÐ&µÈ×Ö·û£¬¿ÉÒÔͨ¹ýCDATAÀ´¹ýÂË£¬µ«ÊǺ¬ÓÐһЩ²»ÈÏʶµÄÌØÊâ×Ö·ûʱºò¾Í»á²»Æð×÷Óã¬ÏÂÃæÊÇ´Ó±ðÈËÄǶùÄÃÀ´µÄÒ»¸ö¹ýÂË·½
·¨£¬¹ýÂËxmlÖеķǷ¨×Ö·û:
//XML±ê×¼¹æ¶¨µÄÎÞЧ×Ö½ÚΪ£º
/*
0×00 – 0×08
0×0b – 0×0c
0×0e – 0×1f
* ......
WSDL£ºÊÇÒ»¸öÓÃÀ´ÃèÊöWeb·þÎñºÍ˵Ã÷ÈçºÎÓëWeb·þÎñͨÐŵÄXMLÓïÑÔ¡£ ÔõÑùÏò±ðÈ˽éÉÜÄãµÄWeb serviceÓÐʲô¹¦ÄÜ£¬ÒÔ¼°Ã¿¸öº¯Êýµ÷ÓÃʱµÄ²ÎÊýµÈµÈ¡£
web·þÎñ£º½øÐÐwebÉÏÊý¾Ý½»»»µÄ·½·¨¡£Äܹ»ÒÔ´¿xml·½Ê½Í¨ÐÅ¡£
SOAP£º¼òµ¥¶ÔÏó´æÈ¡ÐÒé¡£¿É¿´×öxml·½ÑÔ£» ÒÔSOAPÐÅ·âÀ´´«µÝºÍÏìÓ¦Îı¾£¨°üº¬£ºÊײ¿¡¢Ö÷Ì壩HTTP P ......
asp.net¿ª·¢µÄÅóÓÑ£¬¾³£Óõõ½web.configÎļþµÄÅäÖã¬ËùÒÔÎÒÃÇÌØÕûÀíÁËÖÐÎÄ˵Ã÷¡£
<?xml version="1.0" standalone="yes"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<!--ÅäÖÃÈ«¾Ö±äÁ¿-->
<appSettings>
<add key="examstr" value="server=.;da ......