asp.netÖÐsubstringÓ÷¨
substring
public String substring(int beginIndex)·µ»ØÒ»¸öеÄ×Ö·û´®£¬ËüÊÇ´Ë×Ö·û´®µÄÒ»¸ö×Ó×Ö·û´®¡£¸Ã×Ó×Ö·û´®Ê¼ÓÚÖ¸¶¨Ë÷Òý´¦µÄ×Ö·û£¬Ò»Ö±µ½´Ë×Ö·û´®Ä©Î²¡£
ÀýÈ磺
"unhappy".substring(2) returns "happy"
"Harbison".substring(3) returns "bison"
"emptiness".substring(9) returns "" (an empty string)
²ÎÊý£º
beginIndex - ¿ªÊ¼´¦µÄË÷Òý£¨°üÀ¨£©¡£
·µ»Ø£º
Ö¸¶¨µÄ×Ó×Ö·û´®¡£
Å׳ö£º
IndexOutOfBoundsException - Èç¹û beginIndex Ϊ¸º»ò´óÓÚ´Ë String ¶ÔÏóµÄ³¤¶È¡£
--------------------------------------------------------------------------------
substring
public String substring(int beginIndex,
int endIndex)·µ»ØÒ»¸öÐÂ×Ö·û´®£¬ËüÊÇ´Ë×Ö·û´®µÄÒ»¸ö×Ó×Ö·û´®¡£¸Ã×Ó×Ö·û´®´ÓÖ¸¶¨µÄ beginIndex ´¦¿ªÊ¼£¬Ò»Ö±µ½Ë÷Òý endIndex - 1 ´¦µÄ×Ö·û¡£Òò´Ë£¬¸Ã×Ó×Ö·û´®µÄ³¤¶ÈΪ endIndex-beginIndex¡£
ʾÀý£º
"hamburger".substring(4, 8) returns "urge"
"smiles".substring(1, 5) returns "mile"
²ÎÊý£º
beginIndex - ¿ªÊ¼´¦µÄË÷Òý£¨°üÀ¨£©¡£
endIndex - ½áÊø´¦µÄË÷Òý£¨²»°üÀ¨£©¡£
·µ»Ø£º
Ö¸¶¨µÄ×Ó×Ö·û´®¡£
Å׳ö£º
IndexOutOfBoundsException - Èç¹û beginIndex Ϊ¸º£¬»ò endIndex ´óÓÚ´Ë String ¶ÔÏóµÄ³¤¶È£¬»ò beginIndex ´óÓÚ endIndex¡£
C#ÖÐ substring() ÓÐÁ½¸öÖØÔØº¯Êý
substring(int a) Ó÷¨Í¬ÉÏ
substring(int a,int b) b²ÎÊýÓ¦¸ÃΪ½ØÈ¡ºóµÄ×Ö·û´®³¤¶È
ÉÏÃæstringµÃÓ÷¨²»ÖªÊÇÕë¶ÔÄÄÖÖÓï·¨
Õë¶ÔµÄÊÇc#
Ïà¹ØÎĵµ£º
//private string datapatch = ConfigurationSettings.AppSettings["acessconn"];//Êý¾Ý¿âµØÖ·
private string datapatch = "db/global.asa";//Êý¾Ý¿âµØÖ·
///
/// È¡µÃdataset
//
/// ²éѯÓï¾ä
///
public DataSet GetDataSet(string Commandtext)
{&nbs ......
·¨Ò»£ºµ÷ÓÃwinrar
using Microsoft.Win32;
using System.Diagnostics;
protected void Button1_Click(object sender, EventArgs e)
{
RAR(@"E:\95413594531\GIS", "tmptest", @"E:\95413594531\");
}
/// < ......
ajax ÔÚĿǰ web ÁìÓòÒѹ㷺ӦÓã¬ÆäÕæÕýºËÐÄÖ»²»¹ýÊÇÒ»¸ö·â×°ºÃÁ赀 js ¿â¡£×îÎ廨°ËÃŵÄιýÓÚ asp.net µÄ¿Ø¼þ£¬ÎÒ¸öÈËÈÏΪ ajax Ö»ÊÇÒ»¸öÇáÁ¿¼¶µÄ¶«Î÷£¬¸ù±¾Ã»ÓбØÒª½«Ëüд³É·þÎñÆ÷×é¼þ£¬Èç ajax.net¡¢AjaxControlToolkit µÈ¡£ËùÒÔÎÒÒ»Ö±ÊÓÕâЩ×é¼þΪÀ¬»ø¡£¡£¡£
ÒÔÏÂ˵Ã÷ÎÒΪʲô²»ÈÏͬ ajax µÄÏà¹Ø×é¼þ£º ......
×î½üÅöµ½Ò»ÎÊÌ⣬ÐèÒªÔÚASP.NetºÍJavaScriptÖд«µÝÊý¾Ý¡£¾ßÌåµÄÐèÇóÊÇÕâÑùµÄ£¬Ò³Ãæpostbackºó½«»áload JS£¬µ«ÊÇÐèÒª¼Çס֮ǰij¸ö״̬£¬Õâ¸ö״̬ÊÇÖ¸JSµÄ״̬£¬Ò²¾ÍÊÇ˵load JSºó£¬»¹Òª¼Çס֮ǰµÄ״̬£¬¶ø²»Êǻص½Ä¬ÈϵÄ״̬¡£
Ò»¿ªÊ¼ÏëÁ˺ܶà°ì·¨£¬µ«¶¼²»³É¹¦£¬ºóÀ´ÎÊÁËÎÊͬÊ£¬·¢ÏÖ¿ÉÒÔͨ¹ýÒþ²ØµÄ±íµ¥ÔªËØÀ´´«µÝÊý¾Ý£¬ËùÒ ......
http://www.chinaz.com/Program/.NET/101U1142006.html
¡¡¡¡1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
´«ËͲÎÊý£º
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</script>")
½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QuerySt ......