|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
c++是语言,其实C++和java的应用范围根本就不一样的。在java应用的领域内,c++是不合适的。所以微软才搞了C#和Java对抗。Thenew.NetservermodelinDreamweaverMXletsyouleveragethepowerofthe.Netframeworkinavisualenvironment.AnyonethatisfamiliarwithUltradevsRecordsetserverbehaviorwillfeelverycomfortablemovingto.NetsDataSet.EvenifyouhaveneverworkedwithDreamweaver,thistutorialwillshowyouhoweasyitis.
Firstoff,weneedtocreateaconnectiontothedatabase.ThisisdoneintheDatabasestabintheFilespanel.Youcanchoosebetweentwodifferenttypesofconnections
- OleDbConnection
- SqlServerConnection
ODBC,althoughsomewhatsupportedinthe.Netframeworkasaseparatedownload,wasleftoutofthisrelease.ThisisprobablyagoodthingbecausealmosteverymajordatabasehasOleDbdriversonthewindowsplatform.ODBCisnotasfastasOleDb,whichisprobablywhyMicrosoftchoseto"barely"supportitasaseparatedownload.IfyouareusingSQLServerasyourdatabase,thentheSqlServerconnectionistheonlywaytogoasitoffersperformanceadvantages.
WewillbecreatingaSqlServerConnectioninthistutorialbecausethatiswhatIamworkingwith.TheOleDbconnectionisnotmuchdifferentotherthanthefactthatyoucanbringupthemicrosoftdatalinkdialog.
- Clickthe+IconintheDatabasespanel
- ChooseSQLServerConnection
- Fillouttheinformationforyourdatabaseintheprovidedtemplate
Onceyouaredone,youwillseeatreeviewofyourdatabasethatletsyouexploretables,views,andstoredprocedures.
ThenextstepistoApplytheDataSetserverbehavior.
- Clickthe+iconintheServerBehaviorspanel
- ChooseDataset
- Nameyourdataset
- Chooseyourconnection
- Choosethetableandfieldsyouwanttoretrieve
ThisistheexactsameinterfaceastheaspservermodelsoasImentionedbefore,transitioningto.Netdevelopmentwillbeeasyifyoucomefromanaspbackground.
AfteryouhavecreatedtheDataset,youwillfindthatthecontentsofthedatsetaredisplayedintheBindingspanel.Youcandrageachfieldovertothepageyouareworkingin,andplaceitwhereveritneedstogoinyourdesign.Onceyouhavelaidouryourdesign,youcanapplytherepeatregionserverbehavior.
- Highlighttheitemsyoujustplacedonthepage.
Makesureyoutakeintoconsiderationpagebreaks,whetherthatbeas<br/>attheend,<p></p>aroundtheselection,orwithin<tr></tr>tags.
- Clickthe+iconintheserverbehaviorstab.
- ChooseRepeatRegion
Behindthescenes,Dreamweaveractuallyplacesthecontentsofyourselectionwithin<asp:repeater>tags.
Itsassimpleasthat,onceyoudothisacoupleoftimes,itbecomessecondnature,soyoucanfocusonbuildingyourapplications,insteadofrememberingesotericobjectp
对于new隐藏成员的作用,往往是出于使用了一个第三方类库,而你又无法获得这个类库的源代码,当你继承这个类库的某个类时,你需要重新实现其中的一个方法,而又需要与父类中的函数使用同样的函数,这是就需要在自定义的子类中把那个同名函数(或成员)加上new标记,从而隐藏父类中同名的成员。 |
|