ASP.NET Dynamic Website Design Courses - personal website

  Time flies, time flies, but also when the semester, yes, I'm here to make curriculum design, hhh.

  This paper describes how to use the basis of H5 + CSS3 write a static site, combined with the ASP.NET dynamic website development, making a dynamic personal homepage.

  Virtual Stdio first need to familiarize yourself with the compilation environment. Open VS, build a site, create a blank site, remember to choose C # language. You can then see the familiar basic framework of H5, some labels are slightly different in some new properties, such as runat = "server" and form and so on.

  The body then static pages pasted in the first sentence, then press the need to change the label for the server control, and then the css files and style reference is also on the position of the head, then click run, you can see the dynamic websites the basic framework to build better.

  How to modify the style of the control it? Before adding a variety of style selector, such as id name box, where you need to add cssClass property in the server control, and then write the corresponding attribute.

  A final note is how to establish a database, how to use the information in the database and then call presented. Here, we first create a new folder in the site App_Data folder, and then establish a good database on the inside can be. Here Access database, in principle, Mysql, Oracle, SQLserve can, just different database connection string is different.

  So how do you use the Access database to establish it? Open the software, create a new database, name, and create a table, add a field named after the table name and save it.

  How to retrieve data and display it on the page? Add a GridView on a new page is created, it can bind fields and data sources. Add an event in the corresponding cs file, also important to note that, when paging occurs, to deal with the corresponding page index change processing code is as follows:

1 protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
2     {
3         GridView1.PageIndex = e.NewPageIndex;
4         GridViewBind();
5     }

  Other pages is to replicate what the main frame, and then modify the content to be part of the contents of the page can be.

  Through this curriculum design, understand the application of H5 and CSS3 in ASP.NET and how to use C # language to operate the database, to finalize a dynamic personal homepage curriculum design.

  If there is a need in this small partner can dish link network to download, the extraction code 4hyl , hope useful to you.

Guess you like

Origin www.cnblogs.com/wenzhixin/p/11109276.html