资源描述:
《ASPNET实验指导书.doc》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、ASP.NET实验指导书V1.0淮阴工学院计算机工程系2008年9月ContentExp1BuildaWebApplication1Exp2UsingtheExpelandButton3Exp3UsingtheRadioButton5Exp4UsingtheDropDownList7Exp5AccessthedataofSQLDB9Exp6AddrecordstoaDatabase12Exp7UsingtheRequiredFieldValidator14Exp8ValidatorControls16Exp9DataBinding18Exp10Da
2、taListController20Exp11SelectingItemsinDataList21Exp12ManagingStateData22HuaiyinInstituteofTechnologyASP.NETLabGuideExp1BuildaWebApplication(1)TargetCreateanewWebapplication,configureandbuildaWebapplication.(2)EquipmentandToolHardware:Pentumn4orhigherPCSoftware:WindowsXPOS、Mic
3、rosoftVisualStudio2005、MicrosoftSQL2000(3)ExpStepåTask1:Createanewfile-systemWebsite1.ClickStart,pointtoAllPrograms,pointtoMicrosoftVisualStudio2005,andthenclickMicrosoftVisualStudio2005.2.Ifyouarepromptedtochoosethedefaultenvironmentsettings,clickGeneralDevelopmentSettings,an
4、dthenclickStartVisualStudio.3.OntheFilemenu,pointtoNewandthenclickWebSite.4.IntheTemplatespane,clickASP.NETWebSite.5.IntheLocationlist,clickFileSystemandthentypeE:ExpfilesAdventure-Works.6.IntheLanguagelist,clickoneofthefollowing:•VisualC#•VisualBasic7.ClickOK.ååTask2:Design
5、theDefault.aspxWebpage1.OntheWebsitemenu,clickAddExistingItem.2.BrowsetotheE:ExpfilesStarterfolderandthenselectthefollowingfiles:•AdvWorksLogo.gif•AdvWorksSideBar.gif•BlueBike.gif•RedBike.gif3.IntheAddExistingItemdialogbox,clickAdd.4.InSolutionExplorer,clickDefault.aspx.5.On
6、theViewmenu,clickDesigner.6.OntheViewmenu,clickToolbox.7.IntheToolbox,expandtheHTMLsectionandthendragaTablecontrolontotheDefault.aspxpage.8.OntheViewmenu,clickPropertiesWindow.9.InthePropertieswindow,clicktheWidthpropertyandthentype100%10.IntheDesignwindow,right-clickthetable,
7、pointtoInsert,andthenclickRowBelow.11.Selectthethreecellsinthefirstrowofthetable.OntheLayoutmenu,clickMergeCells.23HuaiyinInstituteofTechnologyASP.NETLabGuide12.Selectthenewlymergedcell.InthePropertieswindow,clicktheAlignpropertyandthentyperightinthecombobox.13.Clicktheleftmos
8、tcellinthesecondrow.InthePropertieswindow,clicktheStyleproper