Recently, we have time to flip the webcast on msdn to the ground. No matter what we have mastered or are fresh, we have made some record preparation and are ready to launch a series. Start with Su Peng's ASP. net2.0 Quick Start:
Bytes ------------------------------------------------------------------------------------------------------------------
Enalbeautopostback must be set for DDL and checkbox to be used as the server control (the options are automatically refreshed and the value is transferred to the server ).
Bytes ------------------------------------------------------------------------------------------------------------------
Select distinct ziduan from Biao is a non-repeated ziduan field found from the table.
Bytes ------------------------------------------------------------------------------------------------------------------
Can I inherit ienumlator? To directly display the data in datasource without using the gridview.
Bytes ------------------------------------------------------------------------------------------------------------------
If the postbackurl attribute specified in linkbutton is A. aspx, A. aspx is returned after you click it.
Bytes ------------------------------------------------------------------------------------------------------------------
In ASP. NET, convert eval into bind to bind data. MSN space uses many new ASP. NET functions.
Bytes ------------------------------------------------------------------------------------------------------------------
Objectdatasource is used to access middleware/self-written data.
Bytes ------------------------------------------------------------------------------------------------------------------
Xmldatasource can be used to access RSS/blog, and set to xmldatasource by fromview.
For example, drag a label to set its custom source to XPath ("......"), which can be placed into the description of the blog.
Bytes ------------------------------------------------------------------------------------------------------------------
To obtain the value of the current row of girdview, you must add an event. If you want to know XML, we recommend you read the "no-nonsense XML" written by the two tigers.
Bytes ------------------------------------------------------------------------------------------------------------------
Q: Will the returned value from the webpage to the server be monitored by others on the Internet?
A: Yes. Someone will hear it when using sniffer, And the unencrypted transmission information will be directly seen.
Q: Do I have to refresh the adrotator to display new advertisements? Can I convert an advertisement every 10 seconds without refreshing?
A: Yes. If the user does not refresh, You need to refresh it manually.
Q :~ /Indicates the current path?
A: Yes.
Q: How can I restrict only one vote?
A: use cookies.
Q: there are not many multiview and panel queries.
A: They are not exactly the same. I suggest you use multiview more and you will feel its benefits.
Q: Will imgmap affect performance if there are too many regions?
A: No.
Q: Is the coordinate value of the Heat Zone Related to the browser/display screen?
A: No, but the display rate is different and it looks different.
Bytes ------------------------------------------------------------------------------------------------------------------
To add instructions/festivals to a specific day in the calendar control, you need to program in dayrender.
Bytes ------------------------------------------------------------------------------------------------------------------
Imagebutton can set different click events by setting the coordinates of the click area greater than or less. Imagemap is more convenient and powerful. Imagemap: Set hotspot to navigateurl in the hot zone. Set PostBack and postbackvalue for the response. Then, use E. postbackvalue in the code.
Bytes ------------------------------------------------------------------------------------------------------------------
Do not define theme = "theme2" in HTML pages, but stylesheet = "theme2 ".
Bytes ------------------------------------------------------------------------------------------------------------------
To modify theme, you need to write theme in the Code and call: page. theme =.... You can. | skinid is used to process different styles of the same control.
Bytes ------------------------------------------------------------------------------------------------------------------
Set contentplaceholder for the page inheriting the masterpage to have its own controls. ||| CSS can be specified with the specified skin.
Bytes ------------------------------------------------------------------------------------------------------------------
Theme specifies a public display style. masterpage specifies the same component part (similar to a user control). When adding a form, you can specify whether to use masterpage.
Bytes ------------------------------------------------------------------------------------------------------------------
Q: Do I need to reset the parameters set by aspnet_regsql after SQL server restarts?
A: No.
Q: Is it better to use caching technology and SSI to generate static pages?
A: The cache technology is better, because the static page technology will increase hard disk read/write.
Bytes ------------------------------------------------------------------------------------------------------------------
The output HTML page cache and SQL cache (the data retrieved from the cache SQL) only need to be added to the html
<% Ountputcache duration = "60" varybyparam = "NONE" %> and so on. The request is not changed for 60 s.
Cache once, not only local, but also global cache. <%> shows page configuration properties.
Bytes ------------------------------------------------------------------------------------------------------------------
You can also access part of the cache content (callback cache: caches the explicit page based on the parameters returned by the user. This applies to scenarios where the user needs only a limited number of combinations or categories of data)
<% Ountputcache duration = "60" varybyparam = "state" %> and so on. The State is selectparameter name used to filter data from the data source.
For example, in SQL, select... where State = @ State; link each State on the page to implement content filtering cache.
Bytes ------------------------------------------------------------------------------------------------------------------
For example, the page display data is relatively large, for example, a dataset, which consumes memory. For available hard disk caches that are not very real-time displayed and changed, the interval is longer.
You can use <% ountputcache duration = "3600" varybyparam = "NONE" % diskcachable = "true"> to open the hard disk cache. It takes a longer time.
In addition, you can set it in Web. config, as shown below, to cache 2 MB for each application hard disk. If this parameter is not specified, the system will use the default value.
<Caching>
<Outputcache>
<Diskcache enabled = "true"> maxsizeperapp = "2"/>
</Outputcache>
<Outputcachesettings>
<Outputcacheprofiles>
<Add name = "cachefor60seconds" Duration = "60"/>
</Outputcacheprofiles>
</Outputcachesettings>
</Caching>
Bytes ------------------------------------------------------------------------------------------------------------------
The callback cache is similar to the fragment cache. you can insert dynamic changes in real time on the page to make up for static cache insufficiency. It is set based on the API and HTML header.
Use the substitution HTML header to differentiate. You can use the HTML context to call the current event in real time. For details, see 33rd minutes.
Bytes ------------------------------------------------------------------------------------------------------------------
Fragment cache is a special Cache control or a part. The control Timestamp and page Timestamp can be used on the same page. Generally, the database accessed is cached as a user control, for example:
Register the user control with the page header first. In the user control, set cache <% ountputcache duration = "60" varybyparam = "NONE" %>. Do not set cache for the page.
Bytes ------------------------------------------------------------------------------------------------------------------
Database cache: Source = cache ("dataset1"), etc. It is faster to cache dataset or XML than normal outputcache. diskcache is also used for applications with large data volumes.
Bytes ------------------------------------------------------------------------------------------------------------------
The cache database connection pool is updated only when the database changes! Configure aspnet_regsql.exe and specify parameters in Web. config.
To search for a file, you only need to run the command in cmd (DIR file name/s.
Aspnet_regsql has many parameters. Generally, specify-s to specify the server-E as the authorization mode (Windows mode is better).-D to specify that the database-ed cache takes effect.
The following is an example of configuring the connection pool (registering three parts): (Note that it is not local or not .)
Aspnet_regsql.exe-s ". \ sqlexpress"-e-d "pubs"-ed
Aspnet_regsql.exe-s ". \ sqlexpress"-e-d "pubs"-et-T "Authors"
<% @ Outputcache duration = "9999999" sqldependency = "pubs: authors" varybyparam = "NONE" %>
Note that the connection pool should not monitor too many tables and databases. Generally, you can register one or two tables. Otherwise, the connection pool will become a bottleneck when the burden is too heavy.
Bytes ------------------------------------------------------------------------------------------------------------------
You need to coordinate the usage of various caches in Web. config. Configure different cache descriptions and call the descriptions on the page to reduce the workload of repeatedly defining cache descriptions.
Bytes ------------------------------------------------------------------------------------------------------------------
The output cache is the basic method. You must use the callback cache to change the cache to be static.
Fragment caching fragment cache defines the user control and only caches it.
Data caching caches frequently accessed Data
SQL cache configuration connection pool cache.
Cache configuration uses Web. config for public configuration.
Bytes ------------------------------------------------------------------------------------------------------------------