Ñ»·ÎªTextBox¸³Öµ (asp.net C#)
×¢Òâ:
ÔÚʹÓÃFindControlʱ,Ò»¶¨ÒªÔÚ×îÌù½ü²éÕÒ¶ÔÏóµÄÍâ±ß¼ÓÉϸöÈÝÆ÷,Èç¹ûÄãÖ±½ÓÓÃthis.FindControl,»òPage.FindControlÄÇô¾Í»á¾³£³öÏÖ佫¶ÔÏóÉèÖõ½ÊµÀý
µÄ´íÎó,ËùÒÔ×îºÃ¼ÓÒ»¸öÈÝÆ÷,ÄÇôÕâÀï¼ÓµÄDIV¾ÍÊÇÒ»¸öÈÝÆ÷,ΪÁËÈÃFindControlÔÚIDΪ"TextBoxs"µÄDIVÄÚÈ¥ÕÒÃûΪcom1,com2,com3µÄTextBOx;
<div id="TextBoxs" runat="server">
<asp:TextBox ID="com1" runat="server" ></asp:TextBox>
<asp:TextBox ID="com2" runat="server" ></asp:TextBox>
<asp:TextBox ID="com2" runat="server" ></asp:TextBox>
</div>
¼ÙÈçÊý¾Ý¿âÖÐ×Ö¶ÎcomnameµÄ´æ´¢·½·¨Îª:"ͼƬ,ͼÊé,½Ì³Ì"ÖмäÓж¹ºÅ
string[] comArray=dr["comname"].tostring().split(',');
foreach(int i = 0;i<comArray.Lenth;i++)
{
((TextBox)this.TextBoxs.FindControl("com"+(i+1).tostring())).text=comArray[i].tostring();
}
ºÃ,ÄÇÏÖÔÚ¾ÍÍê³ÉÁË
Ïà¹ØÎĵµ£º
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
´«ËͲÎÊý£º
response.write("£¼script£¾window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')£¼/script£¾")
½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1.Attributes. ......
ÏÖÔÚÄ£ÄâÔÚA·þÎñÆ÷ÉÏ·ÃÎÊB·þÎñÆ÷DÅÌϵÄÒ»¸öÎļþ test.txt
1 ÔÚA·þÎñÆ÷ web.config µÄ<system.web>ϼÓÈë<identity impersonate="true" userName="duzhe123.com" password="boosou.com"/>
2 Á½Ì¨·þÎñÆ÷É϶¼½¨Á¢Ò»¸öÕʺŠduzhe123.com£¬ÃÜÂëΪ boosou.com ¡£ºÇºÇ£¬ÕÊºÅºÍ ......
ASP.NETÖ¸ÁîÔÚÿ¸öASP.NETÒ³ÃæÖж¼ÓС£Ê¹ÓÃÕâЩָÁî¿ÉÒÔ¿ØÖÆASP.NETÒ³ÃæµÄÐÐΪ¡£ÏÂÃæÊÇPageÖ¸ÁîµÄÒ»¸öÀý×Ó£º
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
Inherits="_Default" %>
ÔÚASP.NETÒ³Ãæ»òÓû§¿Ø¼þÖÐÓÐ11¸öÖ¸Áî¡£ÎÞÂÛÒ³ÃæÊÇʹÓúǫ́±àÂëÄ£ÐÍ»¹ÊÇÄÚÖñ ......
»ñÈ¡ÇëÇóµÄÒ³µÄ HttpRequest ¶ÔÏó¡£
Ò»¡¢HttpRequest Àà
ʹ ASP.NET Äܹ»¶ÁÈ¡¿Í»§¶ËÔÚ Web ÇëÇóÆڼ䷢Ë굀 HTTP Öµ¡£
ÏÂÃæµÄ´úÂëʾÀýʹÓà StreamWriter ÀཫÈô¸É HttpRequest ÀàÊôÐÔÖµµÄֵдÈëÎļþ¡£¶ÔÓÚÊÇ×Ö·û´®ÀàÐ͵ÄÊôÐÔ£¬ÊôÐÔÖµ±»Ð´ÈëÎļþʱ½«±»±àÂëΪ HTML¡£±íʾ¼¯ºÏµ ......
»ñÈ¡Óë¸Ã Page ¶ÔÏó¹ØÁªµÄ HttpResponse ¶ÔÏ󡣸öÔÏóʹÄúµÃÒÔ½« HTTP ÏìÓ¦Êý¾Ý·¢Ë͵½¿Í»§¶Ë£¬²¢°üº¬ÓйظÃÏìÓ¦µÄÐÅÏ¢¡£
Ò»¡¢HttpResponse Àà
·â×°À´×Ô ASP.NET ²Ù×÷µÄ HTTP ÏìÓ¦ÐÅÏ¢¡£
HttpResponse ÀàÐ͹«¿ªÒÔϳÉÔ±¡£
¹¹Ô캯Êý
Ãû³Æ
˵Ã÷
HttpResponse
»ù´¡½á¹¹¡£³õʼ»¯ HttpRespons ......