Asp.NetÖÐPostÓëGetµÄÇø±ð
±íµ¥formµÄÌá½»ÓÐÁ½ÖÖ·½Ê½£¬Ò»ÖÖÊÇgetµÄ·½·¨£¬Ò»ÖÖÊÇpost µÄ·½·¨.¿´ÏÂÃæ´úÂë,Àí½âÁ½ÖÖÌá½»µÄÇø±ð:
1 <form id="form1" method="get" runat="server">
2 <div>
3 ÄãµÄÃû×Ö<asp:TextBox ID="name" runat="server"></asp:TextBox><br />
4 <br />
5 ÄãµÄÍøÕ¾<asp:TextBox ID="website" runat="server"></asp:TextBox><br />
6 <br />
7 <br />
8 <asp:Button ID="Button1" runat="server" Text="send" /><br />
9 <br />
10 <br />
11 ѧϰrequest ºÍ responseµÄÓ÷¨<br />
12 <br />
13 <br />
14 </div>
15 </form>
1 <form id="form2" method="post" runat="server">
2 <div>
3 ÄãµÄÃû×Ö<asp:TextBox ID="name2" runat="server"></asp:TextBox><br />
4 <br />
5 ÄãµÄÍøÕ¾<asp:TextBox ID="website2" runat="server"></asp:TextBox><br />
6 <br />
7 <br />
8 <asp:Button ID="Button2" runat="server" Text="send" /><br />
9 <br />
10
Ïà¹ØÎĵµ£º
¸ÅÊö
ÔÚ¿ª·¢SilverlightÓ¦ÓóÌÐòʱ£¬ÎÒÃǾ³£»áÓöµ½ÕâÑùÒ»ÖÖÇé¿ö£¬ÐèÒªÔÚSilverlightÓ¦ÓóÌÐòµÄUserControlÖлñÈ¡ASP.NETÒ³Ãæ²ÎÊý£¬Õâ¸ö²ÎÊý²»Ò»¶¨À´×ÔÓÚµ±Ç°SilverlightÓ¦ÓóÌÐòµÄËÞÖ÷Ò³Ãæ£¬¶øÓпÉÄÜÀ´×ÔÓÚÆäËüµÄASP.NETÒ³Ãæ¡£
±¾ÎÄÎÒÃǼòµ¥µÄ½éÉÜÒ»ÏÂÈçºÎÔÚSilverlightÓ¦ÓóÌÐòÖлñÈ¡ASP.NETÒ³Ãæ²ÎÊý¡£
ÐèÇó
ÈçÏÂÃæµÄ ......
<connectionStrings>
<add name="qxConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Web/App_Data/db2.mdb;" providerName="System.Data.OleDb"/>
</connectionStrings> ......
1. ʹÓÃQueryString±äÁ¿
¡¡¡¡QueryStringÊÇÒ»Öַdz£¼òµ¥µÄ´«Öµ·½Ê½£¬Ëû¿ÉÒÔ½«´«Ë͵ÄÖµÏÔʾÔÚä¯ÀÀÆ÷µÄµØÖ·À¸ÖС£Èç¹ûÊÇ´«µÝÒ»¸ö»ò¶à¸ö°²È«ÐÔÒªÇ󲻸߻òÊǽṹ¼òµ¥µÄÊýֵʱ£¬¿ÉÒÔʹÓÃÕâ¸ö·½·¨¡£µ«ÊǶÔÓÚ´«µÝÊý×é»ò¶ÔÏóµÄ»°£¬¾Í²»ÄÜÓÃÕâ¸ö·½·¨ÁË¡£ÏÂÃæÊÇÒ»¸öÀý×Ó£º
a.aspxµÄC#´úÂë
private void Button1_Click(object se ......
ÒªÔÚVS2005ÖÐʹÓÃsqlhelperÀà,±ØÐë°ÑMicrosoft.ApplicationBlocks.Data.dllÒýÓõ½ÏîÄ¿ÖÐ.
1.ͨ¹ý´æ´¢¹ý³Ì²éѯµÄ·½·¨SqlHelper.ExecuteDataset(Êý¾Ý¿âÁ¬½Ó×Ö·û, ´æ´¢¹ý³Ì×Ö·û, ²ÎÊýÊý×é);
2.ͨ¹ý×Ö·û´®²éѯµÄ·½·¨SqlHelper.ExecuteDataset(Êý¾Ý¿âÁ¬½Ó×Ö·û, CommandType.Text , ²éѯ×Ö·û´®,²ÎÊýÊý×é);
3.ͨ¹ý´æ´¢¹ý³Ì²åÈëµ ......