asp.net¿çҳͶµÝ
1.TextBox txt=(TextBox)PreviousPage.FindControl("TextBox1");
2.ÔÚÒ³Ãæ×¢²áͶµÝÒ³µÄÊôÐÔ
<%@ PreviousPageType VirtualPath="crouspostPage.aspx" %>
ÔÚcrouspostPage.aspxµÄ´úÂëÒþ²ØÀàÖÐÌí¼Ó
public TextBox TextBox1
{
get(return _textbox);
}
ÔÚÒ³ÃæÖÐResponse.Write(PreviousPage.TextBox1.Text);
¼ì²â¿çҳͶµÝ
if(PreviousPage==null)
{
Response.Weite("sorry,This`s wrong way to invoke me");
Response.End();
return;
}
/////////Èç¹û´ÓµØÖ·À¸ÊäÈëÒÔÏÂÔò»áÅ׳öÒì³£
if(!PreviousPage.IsCrossPagePostBack)
{
......
}
///ÔÚÄ¿±êÒ³ÖУ¬²âÊÔPreviousPageÊôÐÔÉϵÄIsValidÊôÐÔ£¬²¢ÔÚ´ð°¸·ñ¶¨µÄÇé¿öÏÂÖÐÖ¹ÇëÇó
if(!PreviousPage.IsValid)
{
Response.Weite("sorry,This`s wrong way to invoke me");
Response.End();
return;
}
Ïà¹ØÎĵµ£º
дͼƬc:\1.jpgµ½±ícinfoÖÐ
private static void AddCinfo()
{
string strSql = "insert into cinfo (srvtitle,csttitle,introduction,logo) values
(@srvtitle,@csttitle,@introduction,@logo)";
S ......
»ñÈ¡ ASP.NET ÌṩµÄµ±Ç° Session ¶ÔÏó ( HttpSessionState Àà )¡£¸ÃÊôÐÔÌṩÓйص±Ç°ÇëÇóµÄ»á»°µÄÐÅÏ¢¡£Îª´Ó ASP.NET Ó¦ÓóÌÐòÇëÇóÒ³»òÎĵµµÄÿ¸öÓû§Î¬»¤Ò»¸ö Session ¶ÔÏó¡£µ±Óû§ÔÚÓ¦ÓóÌÐòÖдÓÒ»Ò³Òƶ¯µ½Áíһҳʱ£¬´æ´¢ÔÚ Session ¶ÔÏóÖеıäÁ¿²»»á±»·ÅÆú£»Ïà ......
Èç¹ûÄúµÄ Web Ó¦ÓóÌÐò°üÀ¨ÒªÔÚ¶à¸öÒ³Ö®¼ä¹²ÏíµÄ´úÂ룬Äú¿ÉÒÔ½«´úÂë±£´æÔÚ Web Ó¦ÓóÌÐò¸ùĿ¼ÏµÄÁ½¸öÌØÊâÎļþ¼Ð£¨Bin Îļþ¼ÐºÍ App_Code Îļþ¼Ð£©ÖеÄij¸öÎļþ¼ÐÖС£
Bin Îļþ¼Ð
¿ÉÒÔÔÚ Bin Îļþ¼ÐÖд洢±àÒëµÄ³ÌÐò¼¯£¬²¢ÇÒ Web Ó¦ÓóÌÐòÈÎÒâ´¦µ ......
×î½üÏëÑо¿ÏÂweb service,ÄκÎÕÒ±éÍøÂ磬¶¼Êǽ²Ð©¶¨ÒåÐԵĶ«Î÷£¬·º·º¶ø̸£¬ÎÒ¿´µÄÒ»Öª°ë½â£¬²»µÃÒªÁì¡£²»¹ý½ñÌì×ÜËãÓеãÊÕ»ñ£¬Ð´ÁË ¸öСµÄweb serviceÀý×Ó£¬¾ÍÊÇÅжÏÒ»¸öÊýÊDz»ÊÇÖÊÊý¡£»¹ÊÇÀÏ»°£¬¸ø´ó¼ÒÆðÅ×שÒýÓñµÄ×÷Óã¬Ö»ÊǸø´ó¼Ò½²½âÈçºÎ¿ª·¢×î¼òµ¥µÄweb service³ÌÐò ¡£Ö»ÒªÈëÁËÃż÷£¬ÒÔºóµÄ·¾Í¿ÉÒÔ×Ô¼º×ßÁË¡£
µÚÒ»£¬ ......
http://blog.csdn.net/chengking/archive/2005/10/27/518079.aspx
(Ò»).Ñ¡Ôñ»á»°×´Ì¬´æ´¢·½Ê½
ÔÚWebconfigÎļþÅäÖÃ:
<sessionState mode="???" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString ......