📄 readme.txt
字号:
----------------------------------------
Notes for sample files for
ASP.NET Web Forms Techniques
----------------------------------------
Contents:
* Requirements
* Unzip the sample files
* Create the Virtual Applications
* Install the Database
* Edit the web.config File
* Running the Samples
----------------------------------------
----------------------------------------
* Requirements
--------------
These examples require:
* Internet Information Service v5.0 or above
* A Database Server (e.g. SQL Server or MSDE)
* The .NET Framework and ASP.NET
(see http://www.asp/net)
* The IE Web Controls full installation
(see: http://msdn.microsoft.com/workshop/webcontrols
/webcontrols_entry.asp and http://msdn.microsoft.com
/downloads/samples/internet/asp_dot_net_servercontrols
/webcontrols/Default.asp)
After downloading the example files, you must
configure them for your own server. The tasks
required are:
* Unzip the sample files
------------------------
* Install the files into a subfolder of your Web site.
Unzip the files using the "Restore Folders" or "Restore
Directories" option of your zip file manager software to
recreate the correct folder tree within the sample files.
It doesn't matter what the subfolder is called. We use a
folder named 'webforms' in the book.
* Create the Virtual Applications
---------------------------------
* Create a virtual application for the "xroxcars" and
"cookieless-xroxcars" folders. In Internet Services Manager
(available from Start | Programs | Administrative Tools),
expand the tree in the left-hand window to reveal this folder,
right-click on it, and select Properties. In the Application
Settings section of the Directory page, click the button
marked Create next to the Application name textbox, then
click OK to close the Properties dialog.
* Install the Database
----------------------
* Install the database. We've provided SQL scripts and
instructions for creating the database in the folder named
database of the samples. We've also provided a SQL Server 2000
compatible database backup that you can restore instead of
running the SQL scripts. The examples use a Logon named
"anon", with a blank password. You can edit the value named
"XroxCarsConnectString" in the <appSettings> section of the
web.config file located in the root folder of the sample files
to use any database and any appropriate Logon name and password.
The sample applictaions are configured to use SQL Server only,
as they use the classes from the .NET System.Data.SqlClient
namespace for data access. To use any other data store you
will have to change the data access code to use the classes
from the System.Data.OleDb or System.Data.Odbc namespaces.
* Edit the web.config File
--------------------------
Several of the values used in the sample Xrox Cars application
and the other example files are stored in the web.config file
located in the root folder of the samples. This includes the
database connection string that you can edit to suit your DB:
<add key="XroxCarsConnectString"
value="server=localhost;database=XroxCars;uid=anon;pwd=;" />
The car finance interest rate used in the Car Details pages:
<add key="XroxCarsInterestRate" value="4.75" />
The price premium for metallic paint used in the Car Details pages:
<add key="XroxCarsMetallicPaint" value="375.00" />
The email address shown in the page footer and used as the "From"
address in email messages generated by the Xrox Cars example:
<add key="XroxCarsWebmasterEmail" value="[you@your-site.com]" />
Note that you must edit this last one to point to a valid email
address on your system, as many routing servers will not forward
email messages that have invalid "From" addresses.
* Running the Samples
------------------------
Navigate to the folder you just created, for example
http://localhost/webforms/, where a menu provides access to
all the examples.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -