|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
完全不一样的。.net其实我也说不太清,.net可以把他理解为跟J2EE相对的工具。c++主要做系统相关的开发你要学.net的话就应该学C#。(其实微软在.NET平台上也考虑了给C++留一个地位。ThiscodewaswritteninresponsetoamessagepostedononeofCharlesCarrollsASP.NETlists.Youcansignupforoneorallofthelistshere.
Code:
<%@PageLanguage="VB"%>
<%@ImportNamespace="System.Data"%>
<%@ImportNamespace="System.Data.SqlClient"%>
<html>
<scriptlanguage="VB"runat="server">
SubPage_Load(senderAsObject,eAsEventArgs)
IfNotIsPostBackThen
DropDownList1.DataTextField="pub_name"
DropDownList1.DataValueField="pub_id"
BindList
EndIf
EndSub
SubButtonClick(senderAsObject,eAsEventArgs)
Ifsender.ID="Button1"Then
DropDownList1.DataTextField="pub_id"
DropDownList1.DataValueField="pub_name"
Else
DropDownList1.DataTextField="pub_name"
DropDownList1.DataValueField="pub_id"
EndIf
BindList
Button1.Visible="False"
Button2.Visible="True"
EndSub
SubBindList()
DimmyConnectionAsSqlConnection=newSqlConnection("DataSource=(local)NetSDK;Trusted_Connection=Yes;InitialCatalog=pubs")
DimmyCommandAsSqlCommand=NewSqlCommand("Selectpub_id,pub_nameFrompublishers",myConnection)
myConnection.Open()
DropDownList1.DataSource=myCommand.ExecuteReader(CommandBehavior.CloseConnection)
DropDownList1.DataBind()
DropDownList1.Items.Insert(0,"SelectanItem")
DropDownList1.SelectedIndex=0
EndSub
</script>
<body>
<formrunat="Server">
<asp:DropDownListid="DropDownList1"runat="server"/>
<asp:Buttonid="Button1"Text="SwitchEm"runat="server"/>
<asp:Buttonid="Button2"Text="SwitchEmBack"Visible="False"runat="server"/>
</form>
</body>
</html>
[img=1border=0style=,1src=]http://www.ckuyun.com/[/img]
计算机发展到这个时候,很多技术日益成熟,想学好一种技术都是不容易的,当你学会用的时候你对它的很多原理可能很不了解) |
|