ASP.NET Concept and Practice for beginnersAugust 13, 2009Nicko Satria Utama, MCTS
Concept – What is ASP.NET?ASP.NET is a web application ASP.NET runs on .NET platformASP.NET can build using many language such as VB.NET, C#.NET, C++.NETASP.NET can be viewed on most browser such as Internet Explorer, Firefox/Mozilla, Google Chrome and OperaAugust 13, 2009Nicko Satria Utama, MCTS
Concept – What is ASP.NET?ASP.NET contains HTML as a document layout, server side controls, style sheets, client scripts and many more. ASP.NET is statelessAugust 13, 2009Nicko Satria Utama, MCTS
Practice - HTMLHTML is a document layout. Dem0 how to make a very simple HTML pagesAugust 13, 2009Nicko Satria Utama, MCTS
Concept – Visual Studio 2008It is an IDE or tool helps to design, visualize, develop and deploy ASP.NETIt is composed of severals elements like Menu toolbar, Standard toolbar, various tool, text editor and designerThe tools appears based on project or file types August 13, 2009Nicko Satria Utama, MCTS
Concept – Visual Studio 2008August 13, 2009Nicko Satria Utama, MCTS
Requirement - HardwareWindows XP or later compatible hardware.RAM minimum 1 GB (Recommend 2 GB)Hard disk minimum 160 GB Intel/AMD no problem at least 2 GHz or better to accelerate compiler processAugust 13, 2009Nicko Satria Utama, MCTS
Requirement – Software	Windows XP or Vista or 7.Recommend that has IIS on the edition. (XP Professional, Vista Business or greater, Win 7 Professional or greater) to try deployment of ASP.NET.Visual Studio 2008 (You can use Express edition for study), I recommend standard edition or greater for serious web developmentAugust 13, 2009Nicko Satria Utama, MCTS
Requirement – Software (cont’) Internet browses. I suggest you install latest Internet Explorer, Firefox/Mozilla, Google Chrome and Opera versionMSDN as documentationWord Processing software (MS Word) to help documenting and creating specificationAugust 13, 2009Nicko Satria Utama, MCTS
Practice – ASP.NET Web ProjectAugust 13, 2009Nicko Satria Utama, MCTS
Practice – ASP.NET Web Project -August 13, 2009Result in browser :Nicko Satria Utama, MCTS
Practice – ASP.NET Web ProjectDemo to create a new web projectAugust 13, 2009Nicko Satria Utama, MCTS
Concept - ControlsConsists of user and server controlsServer controls are run and draw HTML. It is usually HTML elements such as textboxUser controls are custom and reusable controls that using same techniques to use ASP.NET web pagesAugust 13, 2009Nicko Satria Utama, MCTS
Practice – Use Server ControlsAugust 13, 2009Nicko Satria Utama, MCTS
Practice – Use Server ControlsAugust 13, 2009Result in browserNicko Satria Utama, MCTS
Practice – Use Server ControlsDemo to use server controls and run itAugust 13, 2009Nicko Satria Utama, MCTS
Concept – ASP.NET EventsEvery ASP.NET objects have events. Common events on every objects : loadedYou can use events to interact with userAugust 13, 2009Nicko Satria Utama, MCTS
Practice – ASP.NET EventsDouble click the pageIn the Page_Load method add statement :TextBox1.Text = "Inihasil dari page load";Run itAugust 13, 2009Nicko Satria Utama, MCTS
Practice – More eventsDrag and drop Button from toolbox to web designer Double click button controlInside method click, fill with these statementsTextbox1.Text = “Click from Button”Run itAugust 13, 2009Nicko Satria Utama, MCTS
Concept – ASP.NET DatasourceASP.NET can manipulate data from various source, eg: Database, XML, File, ObjectsIt is useful when building serious application that can handle data.ASP.NET can access data using built in server control or make your own mechanism.August 13, 2009Nicko Satria Utama, MCTS
Concept - GridviewIt is a server control that helps to display data from datasourceIt is a tabular that contains header and body. Usually header is column name and body is data itselfAugust 13, 2009Nicko Satria Utama, MCTS
Practice – Make database and tableDatabase can be SQL Server or Access. I recommend using SQL Server if available.Create a table of “Student” that contains columns of “no” and “name”. Fill that tables with any dataAugust 13, 2009Nicko Satria Utama, MCTS
Practice – Prepare Pages for DataDrag and drop GridView from toolbox to web designerDrag and drop Datasource that is match with your database. SQLDataSource for SQL Server and AccessDataSource for MS Access from toolbox to web designerAugust 13, 2009Nicko Satria Utama, MCTS
Practice – Use GridViewRun datasource wizard to get database and tables.Choose Gridviewdatasource to ID of DataSource used. Run itAugust 13, 2009Nicko Satria Utama, MCTS
Practice – Gridview with AutoFormatSelect GridviewChoose Autoformat from context menuChoose format do you like Run itAugust 13, 2009Nicko Satria Utama, MCTS
Practice – Respond to Gridview EventAdd textbox to DesignerAdd enable selection from Gridview menuDouble click GridViewInside methods add statementstring teks = GridView1.Rows[GridView1.SelectedIndex].Cells[2].Text;TextBox2.Text = teks;Run it August 13, 2009Nicko Satria Utama, MCTS
Practice – Use DropdownlistDrag and drop dropdownlist from toolbox to designerOpen choose data source menuChoose datasource you builtChoose nama to display and closeRun ItAugust 13, 2009Nicko Satria Utama, MCTS
Concept – CheckboxUseful for multiple selectionUse CheckboxList if you have data source ready and Checkbox if you build your own August 13, 2009Nicko Satria Utama, MCTS
Concept – RadioButtonUseful for single selection and flagUse RadiobuttonList if you have data source ready and RadioButton if you build your ownAugust 13, 2009Nicko Satria Utama, MCTS
Practice – Checkbox and RadioButtonAdd those controls to designersIf you have datasource on it, please use their “list” version, If not just use the generalAdd datasource of you use the “list” version, otherwise type manually.Add group name on radiobuttonRun itAugust 13, 2009Nicko Satria Utama, MCTS
Concept - ImageThe control will display image to browserSupported format : GIF, JPEG, WMF, PNGSize is variousAugust 13, 2009Nicko Satria Utama, MCTS
Practice - ImageGet any images from internet or offlineDrag and drop image control from toolbox to designerCopy image to Visual Studio projectOn ImageURL, choose that imageRun itAugust 13, 2009Nicko Satria Utama, MCTS
Concept – Page NavigationPage navigation means moving from page to pageAnother page has different controlsYou can use Hyperlink or built your own custom navigationAugust 13, 2009Nicko Satria Utama, MCTS
Concept – HyperlinkIt is a control to navigate between pageSince it is server control, you can change dynamically the URLAugust 13, 2009Nicko Satria Utama, MCTS
Practice - NavigationCreate a new ASPX pageAdd any controls that you likeBack to default.aspxDrag and drop Hyperlink from toolbox to web designerFill NavigateURL property with new ASPX pageRun itAugust 13, 2009Nicko Satria Utama, MCTS
Concept – Calendar controlIt is a server control that display calendar and current date from this computerIt can change current date on calendar but not change computer date time valueAugust 13, 2009Nicko Satria Utama, MCTS
Practice - CalendarDrag and drop calendar from toolbox to designerChoose calendar formatting from AutoFormat menuRun itAugust 13, 2009Nicko Satria Utama, MCTS
Concept – State ManagementData is lost when navigating from page to page.Help to maintain state on webUsually use ASP.NET Session or CookiesAugust 13, 2009Nicko Satria Utama, MCTS
Concept - CookiesIt is a little information saved on the browserContains of information and expirationInformation stored is very limitedIt is gone when expire or erased. Browser shutdown, it is always thereAugust 13, 2009Nicko Satria Utama, MCTS
Concept - SessionIt is information that store in serverContain information and have timeout/expireInformation store can be huge. It is not intended to store big data or replacement of databaseBrowser shutdown, session is goneAugust 13, 2009Nicko Satria Utama, MCTS
Practice - SessionGoto default.aspxFind methods that gridview selection changedAdd statement belowSession["Nama"] = teks;Goto new aspx pageDouble click the designer so it can generate page_load methodsAdd statement belowResponse.Write(Session["Nama"]);Run itAugust 13, 2009Nicko Satria Utama, MCTS
Practice - SessionSelect from gridview and then go to another pageShutdown browserRun again and goto your new pageAugust 13, 2009Nicko Satria Utama, MCTS
ReferenceMSDN Documentation. http://msdn.microsoft.com/libraryASP.NET Quickstarthttp://asp.netAugust 13, 2009Nicko Satria Utama, MCTS
For more informationBlogs : http://nickotech2000.blogspot.comWebsite : http:// nickosatria.comPhone : +628175151219This slide can get online on http://slideshare.com/nickotech2000August 13, 2009Nicko Satria Utama, MCTS

ASP.NET Concept and Practice

  • 1.
    ASP.NET Concept andPractice for beginnersAugust 13, 2009Nicko Satria Utama, MCTS
  • 2.
    Concept – Whatis ASP.NET?ASP.NET is a web application ASP.NET runs on .NET platformASP.NET can build using many language such as VB.NET, C#.NET, C++.NETASP.NET can be viewed on most browser such as Internet Explorer, Firefox/Mozilla, Google Chrome and OperaAugust 13, 2009Nicko Satria Utama, MCTS
  • 3.
    Concept – Whatis ASP.NET?ASP.NET contains HTML as a document layout, server side controls, style sheets, client scripts and many more. ASP.NET is statelessAugust 13, 2009Nicko Satria Utama, MCTS
  • 4.
    Practice - HTMLHTMLis a document layout. Dem0 how to make a very simple HTML pagesAugust 13, 2009Nicko Satria Utama, MCTS
  • 5.
    Concept – VisualStudio 2008It is an IDE or tool helps to design, visualize, develop and deploy ASP.NETIt is composed of severals elements like Menu toolbar, Standard toolbar, various tool, text editor and designerThe tools appears based on project or file types August 13, 2009Nicko Satria Utama, MCTS
  • 6.
    Concept – VisualStudio 2008August 13, 2009Nicko Satria Utama, MCTS
  • 7.
    Requirement - HardwareWindowsXP or later compatible hardware.RAM minimum 1 GB (Recommend 2 GB)Hard disk minimum 160 GB Intel/AMD no problem at least 2 GHz or better to accelerate compiler processAugust 13, 2009Nicko Satria Utama, MCTS
  • 8.
    Requirement – Software WindowsXP or Vista or 7.Recommend that has IIS on the edition. (XP Professional, Vista Business or greater, Win 7 Professional or greater) to try deployment of ASP.NET.Visual Studio 2008 (You can use Express edition for study), I recommend standard edition or greater for serious web developmentAugust 13, 2009Nicko Satria Utama, MCTS
  • 9.
    Requirement – Software(cont’) Internet browses. I suggest you install latest Internet Explorer, Firefox/Mozilla, Google Chrome and Opera versionMSDN as documentationWord Processing software (MS Word) to help documenting and creating specificationAugust 13, 2009Nicko Satria Utama, MCTS
  • 10.
    Practice – ASP.NETWeb ProjectAugust 13, 2009Nicko Satria Utama, MCTS
  • 11.
    Practice – ASP.NETWeb Project -August 13, 2009Result in browser :Nicko Satria Utama, MCTS
  • 12.
    Practice – ASP.NETWeb ProjectDemo to create a new web projectAugust 13, 2009Nicko Satria Utama, MCTS
  • 13.
    Concept - ControlsConsistsof user and server controlsServer controls are run and draw HTML. It is usually HTML elements such as textboxUser controls are custom and reusable controls that using same techniques to use ASP.NET web pagesAugust 13, 2009Nicko Satria Utama, MCTS
  • 14.
    Practice – UseServer ControlsAugust 13, 2009Nicko Satria Utama, MCTS
  • 15.
    Practice – UseServer ControlsAugust 13, 2009Result in browserNicko Satria Utama, MCTS
  • 16.
    Practice – UseServer ControlsDemo to use server controls and run itAugust 13, 2009Nicko Satria Utama, MCTS
  • 17.
    Concept – ASP.NETEventsEvery ASP.NET objects have events. Common events on every objects : loadedYou can use events to interact with userAugust 13, 2009Nicko Satria Utama, MCTS
  • 18.
    Practice – ASP.NETEventsDouble click the pageIn the Page_Load method add statement :TextBox1.Text = "Inihasil dari page load";Run itAugust 13, 2009Nicko Satria Utama, MCTS
  • 19.
    Practice – MoreeventsDrag and drop Button from toolbox to web designer Double click button controlInside method click, fill with these statementsTextbox1.Text = “Click from Button”Run itAugust 13, 2009Nicko Satria Utama, MCTS
  • 20.
    Concept – ASP.NETDatasourceASP.NET can manipulate data from various source, eg: Database, XML, File, ObjectsIt is useful when building serious application that can handle data.ASP.NET can access data using built in server control or make your own mechanism.August 13, 2009Nicko Satria Utama, MCTS
  • 21.
    Concept - GridviewItis a server control that helps to display data from datasourceIt is a tabular that contains header and body. Usually header is column name and body is data itselfAugust 13, 2009Nicko Satria Utama, MCTS
  • 22.
    Practice – Makedatabase and tableDatabase can be SQL Server or Access. I recommend using SQL Server if available.Create a table of “Student” that contains columns of “no” and “name”. Fill that tables with any dataAugust 13, 2009Nicko Satria Utama, MCTS
  • 23.
    Practice – PreparePages for DataDrag and drop GridView from toolbox to web designerDrag and drop Datasource that is match with your database. SQLDataSource for SQL Server and AccessDataSource for MS Access from toolbox to web designerAugust 13, 2009Nicko Satria Utama, MCTS
  • 24.
    Practice – UseGridViewRun datasource wizard to get database and tables.Choose Gridviewdatasource to ID of DataSource used. Run itAugust 13, 2009Nicko Satria Utama, MCTS
  • 25.
    Practice – Gridviewwith AutoFormatSelect GridviewChoose Autoformat from context menuChoose format do you like Run itAugust 13, 2009Nicko Satria Utama, MCTS
  • 26.
    Practice – Respondto Gridview EventAdd textbox to DesignerAdd enable selection from Gridview menuDouble click GridViewInside methods add statementstring teks = GridView1.Rows[GridView1.SelectedIndex].Cells[2].Text;TextBox2.Text = teks;Run it August 13, 2009Nicko Satria Utama, MCTS
  • 27.
    Practice – UseDropdownlistDrag and drop dropdownlist from toolbox to designerOpen choose data source menuChoose datasource you builtChoose nama to display and closeRun ItAugust 13, 2009Nicko Satria Utama, MCTS
  • 28.
    Concept – CheckboxUsefulfor multiple selectionUse CheckboxList if you have data source ready and Checkbox if you build your own August 13, 2009Nicko Satria Utama, MCTS
  • 29.
    Concept – RadioButtonUsefulfor single selection and flagUse RadiobuttonList if you have data source ready and RadioButton if you build your ownAugust 13, 2009Nicko Satria Utama, MCTS
  • 30.
    Practice – Checkboxand RadioButtonAdd those controls to designersIf you have datasource on it, please use their “list” version, If not just use the generalAdd datasource of you use the “list” version, otherwise type manually.Add group name on radiobuttonRun itAugust 13, 2009Nicko Satria Utama, MCTS
  • 31.
    Concept - ImageThecontrol will display image to browserSupported format : GIF, JPEG, WMF, PNGSize is variousAugust 13, 2009Nicko Satria Utama, MCTS
  • 32.
    Practice - ImageGetany images from internet or offlineDrag and drop image control from toolbox to designerCopy image to Visual Studio projectOn ImageURL, choose that imageRun itAugust 13, 2009Nicko Satria Utama, MCTS
  • 33.
    Concept – PageNavigationPage navigation means moving from page to pageAnother page has different controlsYou can use Hyperlink or built your own custom navigationAugust 13, 2009Nicko Satria Utama, MCTS
  • 34.
    Concept – HyperlinkItis a control to navigate between pageSince it is server control, you can change dynamically the URLAugust 13, 2009Nicko Satria Utama, MCTS
  • 35.
    Practice - NavigationCreatea new ASPX pageAdd any controls that you likeBack to default.aspxDrag and drop Hyperlink from toolbox to web designerFill NavigateURL property with new ASPX pageRun itAugust 13, 2009Nicko Satria Utama, MCTS
  • 36.
    Concept – CalendarcontrolIt is a server control that display calendar and current date from this computerIt can change current date on calendar but not change computer date time valueAugust 13, 2009Nicko Satria Utama, MCTS
  • 37.
    Practice - CalendarDragand drop calendar from toolbox to designerChoose calendar formatting from AutoFormat menuRun itAugust 13, 2009Nicko Satria Utama, MCTS
  • 38.
    Concept – StateManagementData is lost when navigating from page to page.Help to maintain state on webUsually use ASP.NET Session or CookiesAugust 13, 2009Nicko Satria Utama, MCTS
  • 39.
    Concept - CookiesItis a little information saved on the browserContains of information and expirationInformation stored is very limitedIt is gone when expire or erased. Browser shutdown, it is always thereAugust 13, 2009Nicko Satria Utama, MCTS
  • 40.
    Concept - SessionItis information that store in serverContain information and have timeout/expireInformation store can be huge. It is not intended to store big data or replacement of databaseBrowser shutdown, session is goneAugust 13, 2009Nicko Satria Utama, MCTS
  • 41.
    Practice - SessionGotodefault.aspxFind methods that gridview selection changedAdd statement belowSession["Nama"] = teks;Goto new aspx pageDouble click the designer so it can generate page_load methodsAdd statement belowResponse.Write(Session["Nama"]);Run itAugust 13, 2009Nicko Satria Utama, MCTS
  • 42.
    Practice - SessionSelectfrom gridview and then go to another pageShutdown browserRun again and goto your new pageAugust 13, 2009Nicko Satria Utama, MCTS
  • 43.
    ReferenceMSDN Documentation. http://msdn.microsoft.com/libraryASP.NETQuickstarthttp://asp.netAugust 13, 2009Nicko Satria Utama, MCTS
  • 44.
    For more informationBlogs: http://nickotech2000.blogspot.comWebsite : http:// nickosatria.comPhone : +628175151219This slide can get online on http://slideshare.com/nickotech2000August 13, 2009Nicko Satria Utama, MCTS