Dynamic website is important for each website owners because in fact website like this is much better, easier and more effective as well. If your website needs quick and easy dynamic data processor without needing to write a lot of codes, the thing that you need is the Visual Studio 2008 or the Visual web developer 2008 express. You can install it in your computer. We have to remember that a dynamic website uses a mechanism that is called Scaffolding. When scaffolding is activated it wills possibly ASP.NET through your data model. It will create website page for your table. Those pages that are made had already owned some abilities like insert, delete and update for every table.
Below are some steps for building new dynamic site with ASP.NET
- STEP 1. Make a dynamic data website. For this case, you can go to File – new web site and choose Dynamic Data Website Template. Add a name and choose the location and languages that will be used. Then click the OK button.
- STEP 2. Add data to your web site. For this step you can copy paste the file pubs.mdf that you wanted to use in your app data folder.
- STEP 3. Making data model by using LINQ to SQL. You have to do the right click on App_code and add new LINQ to SQL classes at the option of LINQ to SQL. There is Dara Classes dbml that was opened in O/R Designer.
- STEP 4. Drag and drop the table to Object Relational Designer. You can drag and drop table author to O/R Designer from server explorer and save it in Dataclasses.dbml.
- STEP 5. Look if VS had already made for you. Make sure and pay attention that there are 2 files of dataclasses.dbml.layout and dataclasses.designer.vb that are existed in .dbml node file. Open your dataclassesdesigner.vb and you can see that there is a dataclassesdatacontext of partial public. This file is included the entity class for author table (partial public class author).
- STEP 6. Context data lists in global.asax file. Open the global.asax and add some VB code in method register routes and save file.
- STEP 7. Look the page in Browser. Now you can see the page of default.aspx by using the view in browser. It will display the link for table author. Click on the name table and you will see a page with data from author table. There is also an option of readymade for you to be edited, delete and insert a new data.
Those are some steps for building new dynamic site with ASP.NET. You can do the steps above by yourself. However, if you find that those steps are so complicated and not easy, ask the help from some professionals or experts are really recommended. We hope that this article is beneficial.