求学习asp的方法?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了求学习asp的方法?相关的知识,希望对你有一定的参考价值。

我想建一个个人的动态小网站,可苦于没有英语的底子.看人家写代码只能照葫芦画瓢,根本不知道什么意思.

求哪位高人大侠帮写一个 常用APS单词 的表,带中文解释的.

谢谢了.小弟感激不尽

其实,ASP就新增,修改,删除,查询,只要掌握住这些方法,万变不离其宗

ASP常用代码
------------------------------------------------------------

sql常用命令方法!!!
(1) 数据记录筛选:

sql="select * from 数据表 where 字段名=字段值 order by 字段名 [desc]"

sql="select * from 数据表 where 字段名 like ''%字段值%'' order by 字段名 [desc]"

sql="select top 10 * from 数据表 where 字段名 order by 字段名 [desc]"

sql="select * from 数据表 where 字段名 in (''值1'',''值2'',''值3'')"

sql="select * from 数据表 where 字段名 between 值1 and 值2"

(2) 更新数据记录:

sql="update 数据表 set 字段名=字段值 where 条件表达式"

sql="update 数据表 set 字段1=值1,字段2=值2 …… 字段n=值n where 条件表达式"

(3) 删除数据记录:

sql="delete from 数据表 where 条件表达式"

sql="delete from 数据表" (将数据表所有记录删除)

(4) 添加数据记录:

sql="insert into 数据表 (字段1,字段2,字段3 …) valuess (值1,值2,值3 …)"

sql="insert into 目标数据表 select * from 源数据表" (把源数据表的记录添加到目标数据表)

(5) 数据记录统计函数:

AVG(字段名) 得出一个表格栏平均值
COUNT(*|字段名) 对数据行数的统计或对某一栏有值的数据行数统计
MAX(字段名) 取得一个表格栏最大的值
MIN(字段名) 取得一个表格栏最小的值
SUM(字段名) 把数据栏的值相加

引用以上函数的方法:

sql="select sum(字段名) as 别名 from 数据表 where 条件表达式"
set rs=conn.excute(sql)

用 rs("别名") 获取统的计值,其它函数运用同上。

(5) 数据表的建立和删除:

CREATE TABLE 数据表名称(字段1 类型1(长度),字段2 类型2(长度) …… )

例:CREATE TABLE tab01(name varchar(50),datetime default now())

DROP TABLE 数据表名称 (永久性删除一个数据表)

select distinct * into yjkc2 from yjkc
drop table yjkc
select * into yjkc from yjkc2
drop table yjkc2

SQL连接方式==================================================

dim conn
set conn=server.createobject("ADODB.connection")
conn.open "PROVIDER=SQLOLEDB;DATA SOURCE=服务器;UID=用户名;PWD=密码;DATABASE=表名;"

access连接方式=================================================

dim conn
dim connstr
on error resume next
connstr="DBQ="+server.mappath("数据库路径")+";DefaultDir=;DRIVER=Microsoft Access Driver (*.mdb);"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr

包含页========================================================
<!--#include file=文件名 -->

调用表=======================================================
set rs=server.createobject("adodb.recordset")
sql="select * from 表名 where 字段=变量 order by 字段 desc"
rs.open sql,conn,1,1

打开数据库之后固定修改某个字段
conn.execute("Update 表名 Set 字段=字段+1 Where 字段=变量"

删除内容======================================================
set rs=server.createobject("adodb.recordset")
sql="select * from 表名 where 字段=变量"
rs.open sql,conn,1,3
有图片就删除图片
Picture=rs("newspic")
set fs=server.CreateObject("scripting.filesystemobject")
Picture=server.MapPath(Picture)
if fs.FileExists(Picture) then
fs.DeleteFile Picture,true
end if
rs.delete
rs.update
response.redirect request.servervariables("http_referer")
end if

分页=====================================================

<table width="98%" border="0" cellspacing="1" cellpadding="3" bgcolor="cccccc">
<tr bgcolor="f5f5f5">
<td width=10% align=center>
<font color="">id
</td>
<td width=40% align=center>关 键 词;</td>
<td width=10% align=center>价 格</td>
<td width=20% align=center>修 改</td>
<td width=20% align=center>删 除</td>
</tr>
<%
If Request.QueryString("page") = "" or Request.QueryString("page") = 0 then
page = 1
Else
page = CINT(Request.QueryString("page"))
End If
if request("pm")="" then
set rs=server.CreateObject("adodb.recordset")
sql="select * from p_words order by id desc"
rs.open sql,conn,1,1
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from p_words where pm_name like '%"&request("pm")&"%'"
rs.open sql,conn,1,1
end if
if rs.eof and rs.bof then%>
<tr >
<td width=10% align=center colspan="6" >
暂时没有记录!!

</td>
</tr>
<%
else
%>
<%
RS.PageSize=10'设置每页记录数
Dim TotalPages
TotalPages = RS.PageCount

If page>RS.Pagecount Then
page=RS.Pagecount
end if

RS.AbsolutePage=page
rs.CacheSize = RS.PageSize'设置最大记录数
Dim Totalcount
Totalcount =INT(RS.recordcount)

StartPageNum=1
do while StartPageNum+10<=page
StartPageNum=StartPageNum+10
Loop

EndPageNum=StartPageNum+9

If EndPageNum>RS.Pagecount then EndPageNum=RS.Pagecount %>
<%I=0
p=RS.PageSize*(page-1)
do while (Not RS.Eof) and (I<RS.PageSize)
p=p+1%>

<form action="?act=move&id=<%=rs("id")%>" method=post name=form1>
<tr bgcolor="#FFFFFF">
<td align=center><%=rs("id")%></td>
<td><input type=text name="pm_name" size=12 value="<%=rs("pm_name")%>"></td>
<td align=center><input type=text name="pm_p" size=8 value="<%=rs("pm_p")%>"></td>
<td align=center><input type='submit' class='button' value='修改'></td>
<td align=center><input type="button" name="Submit" value="删除" class="button" onclick="location='biglist.asp?act=del&id=<%=rs("id")%>'"></td>
</tr>
</form>

<%I=I+1
RS.MoveNext
Loop%>

<tr> <td colspan="6" align=right height=30>
共有<font color=red><%=rs.recordcount%></font>个关键词,<font color=red><%=page%></font>/<%=TotalPages%>页
【<a href="<%=request.ServerVariables("URL")%>?page=1">首页</a>】
<% if page>1 then %>
【<a href="<%=request.ServerVariables("URL")%>?page=<%=StartPageNum-1%>">上一页</a>】
<%else%>
<%end if%>
<% For I=StartPageNum to EndPageNum
if I<>page then %><A href="?page=<%=I%>"><u><%=I%></u> </A><% else %><font color=red><%=I%></font> <% end if %><% Next %><% if EndPageNum<RS.Pagecount then %>
【<a href="<%=request.ServerVariables("URL")%>?page=<%=EndcPageNum+i%>">下一页</a>】
<%end if%>
【<a href="<%=request.ServerVariables("URL")%>?page=<%=TotalPages%>">尾页</a>】

</td></tr>

<%
end if
rs.close
%>

</table>

常用JAVA===========================================================
response.write"<SCRIPT language=javascript>alert('该关键词已经存在。');"
response.write"javascript:history.go(-1)</SCRIPT>"
'response.redirect "biglist.asp"
'response.write"this.location.href='index.asp';</SCRIPT>"
'response.redirect request.servervariables("http_referer")

response.end

常用命令=============================================================

两个表循环
<%
dim crs1
dim csql1
Set crs1= Server.CreateObject("ADODB.Recordset")
csql1="select * from commercetype"
crs1.open csql1,conn,1,1
%>
<%do while not crs1.eof%>
<%
Set all= Server.CreateObject("ADODB.Recordset")
csql1="select * from Commerce where Typeid="&crs1("Typeid")
all.open csql1,conn,1,1

%>
<td width="20%" height=17 bgcolor="#E4F4FC" valign=middle>
<font color=red>
<%if not all.eof then%>
<%=all.recordcount%>
<%else%>
0
<%end if%>
</font>
</td>
<%
crs1.movenext
loop
%>

去掉太长的录入文字:
<td style="word-wrap:break-word;word-break:break-all;">

<%=ltrim(arr(j))%>
去掉左空格
instr(request.form("t"),",")>0
查验是否有,号
arr=split(request.form("t"),",")
去掉,并付值给arr
ubound(arr)
个数

ASP函数介绍

1. 函数array() 功能:创建一个数组变量 格式:array(list) 参数:list 为数组变量中的每个数值列,中间用逗号间隔 例子: 结果: i 被赋予为数组

2. 函数Cint() 功能:将一表达式/其它类型的变量转换成整数类型(int) 格式:Cint(expression) 参数:expression 是任何有效的表达式/其它类型的变量 例子: 结果: 236 函数Cint()将字符"234"转换 成整数234.如果表达式为空, 或者无效时,返回值为0;

3. 函数:Creatobject() 功能:创建及返回一个ActiveX对象. 格式:Creatobject(obname) 参数:obname 是对象的名称 例子: 结果:

4. 函数Cstr() 功能:将一表达式/其它类型的变量转换成字符类型(string) 格式:Cstr(expression) 参数:expression是任何有效的表达式/其它类型的变量 例子: 结果:函数Cstr()将整数 5 转换 成字符"5".

5. 函数Date() 功能:返回当前系统(server端)的日期 格式:Date() 参数:无 例子<% date () %> 结果:05/10/00

6. #.函数Dateadd() 功能:计算某个指定的时间和 格式:dateadd(timeinterval,number,date) 参数:timeinterval是时间单位(月,日..); number是时间间隔值,date是时间始点. 例子: 结果: 11/4/99 3:34:45 PM 其中 "m" = "month"; "d" = "day"; 如果是currentDate 格式,则, "h" = "hour"; "s" = "second";

7. #.函数Datediff() 功能:计算某量个指定的时间差 格式:datediff(timeinterval,date1,date2[,firstdayofweek[,firstdayofyear>) 参数:timeinterval 是时间单位; date1,date2是有效的日期表达式,firstdayofweek,firstdayofyear 是任意选项. 例子: 结果:There are 150 days to millenium from 8/4/99.

8. #.函数day() 功能:返回一个整数值,对应于某月的某日 格式:day(date) 参数:date是一个有效的日期表达式; 例子lt;% =date(#8/4/99#) %> 结果:4

9. #.函数formatcurrency() 功能:转换成货币格式 格式:formatcurrency(expression [,digit[,leadingdigit[,paren[,groupdigit>>) 参数:expression 是有效的数字表达式;digit表示小数点后的位数;leadingdigit,paren,groupdigit是任意选项. 例子lt;%=FormatCurrency(34.3456)%> 结果34.35
10. #.函数Formatdatetime() 功能:格式化日期表达式/变量 格式:formatdatetime(date[,nameformat]) 参数:date为有效的日期表达式/变量;nameformat是指定的日期格式常量名称. 例子lt;% =formatdatetime("08/04/99",vblongdate) %> 结果:Wednesday,August 04,1999

11. #.函数Isnumeric() 功能:返回一个布尔值,判断变量是否为数字变量,或者是可以转换成数字的其它变量. 格式:isnumeric(expression) 参数:expression 是任意的变量. 例子: 结果: true.

12. #.函数Isobject() 功能:返回一个布尔值,判断变量是否为对象的变量, 格式:isobject(expression) 参数:expression 是任意的变量. 例子: 结果: true

13. #.函数:Lbound() 功能:返回一个数组的下界. 格式:Lbound(arrayname[,dimension]) 参数:arrayname 是数组变量,dimension 是任意项 例子: 结果:0

14. #.函数Lcase() 功能:将一字符类型变量的字符全部变换小写字符. 格式:Lcase(string) 参数:string是字符串变量 例子: 结果:this is lcase!

15. #.函数left() 功能:截取一个字符串的前部分; 格式:left(string,length) 参数:string字符串,length截取的长度. 例子: 结果:this i

16. #.函数len() 功能:返回字符串长度或者变量的字节长度 格式:len(string |varname) 参数:string字符串;varname任意的变量名称 例子: 结果:15

17. #.函数ltrim() 功能:去掉字符串前的空格. 格式:ltrim(string) 参数:string 字符串. 例子: 结果:Today

19. #.函数minute() 功能:返回一数值, 表示分钟 格式:minute(time) 参数: time是时间变量 例子lt;% =minute(#12:23:34#) %> 结果:23

20. #.函数month() 功能:返回一数值, 表示月份 格式:month(time) 参数:time是日期变量 例子lt;% =month(#08/09/99) %> 结果:9

21. #.函数monthname() 功能:返回月份的字符串(名称). 格式:Monthname(date [,abb]) 参数:date是日期变量,abb=true时 则月份的缩写, 例子: 结果:April

22. #.函数Now() 功能:返回系统的当前时间和日期. 格式:now() 参数:无 例子: 结果: 05/10/00 8:45:32 pm

23. #.函数:replace() 功能:在字符串中查找,替代指定的字符串. 格式:replace(strtobesearched,strsearchfor,strreplacewith [,start[,count[,compare>]) 参数:strtobesearched是字符串; strsearchfor是被查找的子字符串;strreplacewith 是用来替代的子字符串.start,count,compare 是任意选项. 例子: 结果:this is an orange.

24. #.函数right() 功能:截取一个字符串的后部分 格式:right(string,length) 参数:string字符串,length截取的长度. 例子: 结果:st!

25. #.函数rnd() 功能:返回一个随机数值 格式:rnd[(number)] 参数:number是任意数值. 例子: 结果:0/1数值之一,无randomize(), 则不能产生随机数.

26. #.函数round() 功能:完整数值 格式:round(expression[,numright]) 参数:expression数字表达式;numright任意选项. 例子: 结果: 12

27. #.函数rtrim() 功能:去掉字符串后的空格. 格式:rtrim(string) 参数:string 是字符串 例子: 结果:this is a test!

28. #.函数second() 功能:返回一个整数值. 格式:second(time) 参数:time是一个有效的时间表达式; 例子lt;% =second(# 12:28:30#) %> 结果:30

29. #.函数strReverse() 功能:返回与原字符串排列逆向的字符串. 格式:strreverse(string) 参数:string是字符串 例子lt;% =strreverse("this is a test!") 结果:!tset a si siht

30. #.函数time() 功能:返回当前系统的时间值. 格式:time() 参数:无 结果:9:58:28 Am 关键词:ASP

31. #.函数trim() 功能:删去字符串前,后的空格. 格式:trim(string) 参数:string 字符串. 例子: 结果:this is a test!

32. #.函数UBound() 功能:返回一个数组的上界. 格式:Ubound(expression [,dimension]) 参数:expression 是数组表达式/数组变量,dimension 是任意项 例子: 结果: 2

33. #.函数:UCase() 功能:将一字符类型变量的字符全部变换成大写字符. 格式:Ucase(string) 参数:string是字符串变量 例子: 结果:THIS IS LCASE!

34. #.函数Vartype() 功能:返回变量的常量代码(整数) 格式:Vartype(varname) 参数:varname是任何类型的变量名称. 例子: 结果:2 (2表示整数,须要参考ASP常量代码.)

35. #.函数Weekday() 功能:返回一个整数,对应一周中的第几天. 格式:Weekday(date [,firstofweek]) 参数:date为日期变量,firstofweek为任选项. 例子: 结果:3(3 表示是星期二)

36. #.函数weekdayname() 功能:返回字符串,对应星期几. 格式:weekdayname(weekday[,abb[,firstdayofweek>) 参数:weekday为日期变量,abb,firstdayofweek为任选项. 例子: 结果: Wednesday

37. #.函数year() 功能:返回日期表达式所在的年份. 格式:year(date) 参数:date是有效的日期表达式 例子: 结果:1999

参考资料:http://hi.baidu.com/hpjs/blog/item/18269a383f1fdfc6d5622538.html

参考技术A 买本书,那种字典似的,记载了全部asp类、对象、函数的工具书
然后不停的练习就好了

求关于asp.net的英文文献

qq:503717520

http://books.google.com.sg/books?id=mlgYoYgeaUUC&dq=asp.net&printsec=frontcover&source=in&hl=en&ei=-3vqSZrjKcaIkAX4yM2qCA&sa=X&oi=book_result&ct=result&resnum=13

http://books.google.com.sg/books?id=Wn96z4g5pOsC&dq=asp.net&printsec=frontcover&source=in&hl=en&ei=-3vqSZrjKcaIkAX4yM2qCA&sa=X&oi=book_result&ct=result&resnum=14

http://books.google.com.sg/books?id=hziE1NB0UkIC&dq=asp.net&printsec=frontcover&source=in&hl=en&ei=-3vqSZrjKcaIkAX4yM2qCA&sa=X&oi=book_result&ct=result&resnum=15

http://books.google.com.sg/books?q=asp.net&source=in&ei=-3vqSZrjKcaIkAX4yM2qCA&sa=X&oi=book_group&resnum=13&ct=title&cad=bottom-3results

ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites, web applications and web services. It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime (CLR), allowing programmers to write ASP.NET code using any supported .NET language.

Characteristics
Pages
.NET pages, known officially as "web forms", are the main building block for application development.[8] Web forms are contained in files with an ".aspx" extension; in programming jargon, these files typically contain static (X)HTML markup, as well as markup defining server-side Web Controls and User Controls where the developers place all the required static and dynamic content for the web page. Additionally, dynamic code which runs on the server can be placed in a page within a block <% -- dynamic code -- %> which is similar to other web development technologies such as PHP, JSP, and ASP, but this practice is generally discouraged except for the purposes of data binding since it requires more calls when rendering the page.[citation needed]

Note that this sample uses code "inline", as opposed to code behind.

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

protected void Page_Load(object sender, EventArgs e)

Label1.Text = DateTime.Now.ToLongDateString();


</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Sample page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
The current time is: <asp:Label runat="server" id="Label1" />
</div>
</form>

</body>
</html>

[edit] Code-behind model
It is recommended by Microsoft for dealing with dynamic program code to use the code-behind model, which places this code in a separate file or in a specially designated script tag. Code-behind files typically have names like MyPage.aspx.cs or MyPage.aspx.vb based on the ASPX file name (this practice is automatic in Microsoft Visual Studio and other IDEs). When using this style of programming, the developer writes code to respond to different events, like the page being loaded, or a control being clicked, rather than a procedural walk through the document.

ASP.NET's code-behind model marks a departure from Classic ASP in that it encourages developers to build applications with separation of presentation and content in mind. In theory, this would allow a web designer, for example, to focus on the design markup with less potential for disturbing the programming code that drives it. This is similar to the separation of the controller from the view in model-view-controller frameworks.

[edit] Example
<%@ Page Language="C#" CodeFile="SampleCodeBehind.aspx.cs" Inherits="Website.SampleCodeBehind"
AutoEventWireup="true" %>
The above tag is placed at the beginning of the ASPX file. The CodeFile property of the @ Page directive specifies the file (.cs or .vb) acting as the code-behind while the Inherits property specifies the Class the Page derives from. In this example, the @ Page directive is included in SampleCodeBehind.aspx, then SampleCodeBehind.aspx.cs acts as the code-behind for this page:

using System;

namespace Website

public partial class SampleCodeBehind : System.Web.UI.Page

protected override void OnLoad(EventArgs e)

base.OnLoad(e);



In this case, the Page_Load() method is called every time the ASPX page is requested. The programmer can implement event handlers at several stages of the page execution process to perform processing.

[edit] User controls
ASP.NET supports creating reusable components through the creation of User Controls. A User Control follows the same structure as a Web Form, except that such controls are derived from the System.Web.UI.UserControl class, and are stored in ASCX files. Like ASPX files, an ASCX file contains static HTML or XHTML markup, as well as markup defining web control and other User Controls. The code-behind model can be used.

Programmers can add their own properties, methods,[9] and event handlers.[10] An event bubbling mechanism provides the ability to pass an event fired by a user control up to its containing page.

User can also build Custom Controls for Asp.Net application. Where controls are in compiled DLL file. And by using Register directive user can use control from DLL.

[edit] Rendering technique
ASP.NET uses a visited composites rendering technique. During compilation, the template (.aspx) file is compiled into initialization code which builds a control tree (the composite) representing the original template. Literal text goes into instances of the Literal control class, and server controls are represented by instances of a specific control class. The initialization code is combined with user-written code (usually by the assembly of multiple partial classes) and results in a class specific for the page. The page doubles as the root of the control tree.

Actual requests for the page are processed through a number of steps. First, during the initialization steps, an instance of the page class is created and the initialization code is executed. This produces the initial control tree which is now typically manipulated by the methods of the page in the following steps. As each node in the tree is a control represented as an instance of a class, the code may change the tree structure as well as manipulate the properties/methods of the individual nodes. Finally, during the rendering step a visitor is used to visit every node in the tree, asking each node to render itself using the methods of the visitor. The resulting HTML output is sent to the client.

After the request has been processed, the instance of the page class is discarded and with it the entire control tree.

[edit] State management
ASP.NET applications are hosted in a web server and are accessed over the stateless HTTP protocol. As such, if the application uses stateful interaction, it has to implement state management on its own. ASP.NET provides various functionality for state management in ASP.NET applications.

[edit] Application state
Application state is a collection of user-defined variables that are shared by an ASP.NET application. These are set and initialized when the Application_OnStart event fires on the loading of the first instance of the applications and are available till the last instance exits. Application state variables are accessed using the Applications collection, which provides a wrapper for the application state variables. Application state variables are identified by names.[11]

[edit] Session state
Session state is a collection of user-defined session variables, which are persisted during a user session. These variables are unique to different instances of a user session, and are accessed using the Session collection. Session variables can be set to be automatically destroyed after a defined time of inactivity, even if the session does not end. At the client end, a user session is identified either by a cookie or by encoding the session ID in the URL itself.[11]

ASP.NET supports three modes of persistence for session variables:[11]

In Process Mode
The session variables are maintained within the ASP.NET process. This is the fastest way, however, in this mode the variables are destroyed when the ASP.NET process is recycled or shut down. Since the application is recycled from time to time this mode is not recommended for critical applications.
ASPState Mode
In this mode, ASP.NET runs a separate Windows service that maintains the state variables. Because the state management happens outside the ASP.NET process and .NET Remoting must be utilized by the ASP.NET engine to access the data, this mode has a negative impact on performance in comparison to the In Process mode, although this mode allows an ASP.NET application to be load-balanced and scaled across multiple servers. However, since the state management service runs independent of ASP.NET, the session variables can persist across ASP.NET process shutdowns.
SqlServer Mode
In this mode, the state variables are stored in a database server, accessible using SQL. Session variables can be persisted across ASP.NET process shutdowns in this mode as well. The main advantage of this mode is it would allow the application to balance load on a server cluster while sharing sessions between servers.

[edit] View state
View state refers to the page-level state management mechanism, which is utilized by the HTML pages emitted by ASP.NET applications to maintain the state of the web form controls and widgets. The state of the controls are encoded and sent to the server at every form submission in a hidden field known as __VIEWSTATE. The server sends back the variable so that when the page is re-rendered, the controls render at their last state. At the server side, the application might change the viewstate, if the processing results in updating the state of any control. The states of individual controls are decoded at the server, and are available for use in ASP.NET pages using the ViewState collection.[12] [13]

[edit] Other
Other means of state management that are supported by ASP.NET are cookies, caching, and using the query string.

[edit] Template engine
When first released, ASP.NET lacked a template engine. Because the .NET framework is object-oriented and allows for inheritance, many developers would define a new base class that inherits from "System.Web.UI.Page", write methods here that render HTML, and then make the pages in their application inherit from this new class. While this allows for common elements to be reused across a site, it adds complexity and mixes source code with markup. Furthermore, this method can only be visually tested by running the application - not while designing it. Other developers have used include files and other tricks to avoid having to implement the same navigation and other elements in every page.

ASP.NET 2.0 introduced the concept of "master pages", which allow for template-based page development. A web application can have one or more master pages, which begining with ASP.NET 3.5, can be nested.[14] Master templates have place-holder controls, called ContentPlaceHolders to denote where the dynamic content goes, as well as HTML and JavaScript shared across child pages.

Child pages use those ContentPlaceHolder controls, which must be mapped to the place-holder of the master page that the content page is populating. The rest of the page is defined by the shared parts of the master page, much like a mail merge in a word processor. All markup and server controls in the content page must be placed within the ContentPlaceHolder control.

When a request is made for a content page, ASP.NET merges the output of the content page with the output of the master page, and sends the output to the user.

The master page remains fully accessible to the content page. This means that the content page may still manipulate headers, change title, configure caching etc. If the master page exposes public properties or methods (e.g. for setting copyright notices) the content page can use these as well.

[edit] Other files
Other file extensions associated with different versions of ASP.NET include:

Extension Required version Description
asax 1.0 Global.asax, used for application-level logic [15]
ascx 1.0 Web UserControls: custom controls to be placed onto web pages.
ashx 1.0 custom HTTP handlers.
asmx 1.0 web service pages. From version 2.0 a Code behind page of an asmx file is placed into the app_code folder.
axd 1.0 when enabled in web.config requesting trace.axd outputs application-level tracing. Also used for the special webresource.axd handler which allows control/component developers to package a component/control complete with images, script, css etc. for deployment in a single file (an 'assembly')
browser 2.0 browser capabilities files stored in XML format; introduced in version 2.0. ASP.NET 2 includes many of these by default, to support common web browsers. These specify which browsers have which capabilities, so that ASP.NET 2 can automatically customize and optimize its output accordingly. Special .browser files are available for free download to handle, for instance, the W3C Validator, so that it properly shows standards-compliant pages as being standards-compliant. Replaces the harder-to-use BrowserCaps section that was in machine.config and could be overridden in web.config in ASP.NET 1.x.
config 1.0 web.config is the only file in a specific Web application to use this extension by default (machine.config similarly affects the entire Web server and all applications on it), however ASP.NET provides facilities to create and consume other config files. These are stored in XML format.
cs/vb 1.0 Code files (cs indicates C#, vb indicates Visual Basic). Code behind files (see above) predominantly have the extension ".aspx.cs" or ".aspx.vb" for the two most common languages. Other code files (often containing common "library" classes) can also exist in the web folders with the cs/vb extension. In ASP.NET 2 these should be placed inside the App_Code folder where they are dynamically compiled and available to the whole application.
dbml 3.5 LINQ to SQL data classes file
master 2.0 master page file
resx 1.0 resource files for internationalization and localization. Resource files can be global (e.g. messages) or "local" which means specific for a single aspx or ascx file.
sitemap 2.0 sitemap configuration files. Default file name is web.sitemap
skin 2.0 theme skin files.
svc 3.0 Windows Communication Foundation service file

[edit] Directory structure
In general, the ASP.NET directory structure can be determined by the developer's preferences. Apart from a few reserved directory names, the site can span any number of directories. The structure is typically reflected directly in the urls. Although ASP.NET provides means for intercepting the request at any point during processing, the developer is not forced to funnel requests through a central application or front controller.

The special directory names (from ASP.NET 2.0 on) are [16]:

App_Browsers
holds site-specific browser definition files.
App_Code
This is the "raw code" directory. The ASP.NET server automatically compiles files (and subdirectories) in this folder into an assembly which is accessible in the code of every page of the site. App_Code will typically be used for data access abstraction code, model code and business code. Also any site-specific http handlers and modules and web service implementation go in this directory. As an alternative to using App_Code the developer may opt to provide a separate assembly with precompiled code.
App_Data
default directory for databases, such as Access mdb files and SQL Server mdf files. This directory is usually the only one with write access for the application.
App_LocalResources
Contains localized resource files for individual pages of the site. E.g. a file called CheckOut.aspx.fr-FR.resx holds localized resources for the french version of the CheckOut.aspx page. When the UI culture is set to french, ASP.NET will automatically find and use this file for localization.
App_GlobalResources
Holds resx files with localized resources available to every page of the site. This is where the ASP.NET developer will typically store localized messages etc. which are used on more than one page.
App_Themes
holds alternative themes of the site.
App_WebReferences
holds discovery files and WSDL files for references to web services to be consumed in the site.
Bin
Contains compiled code (.dll files) for controls, components, or other code that you want to reference in your application. Any classes represented by code in the Bin folder are automatically referenced in your application.

[edit] Performance
ASP.NET aims for performance benefits over other script-based technologies (including Classic ASP) by compiling the server-side code to one or more DLL files on the web server.[17] This compilation happens automatically the first time a page is requested (which means the developer need not perform a separate compilation step for pages). This feature provides the ease of development offered by scripting languages with the performance benefits of a compiled binary. However, the compilation might cause a noticeable but short delay to the web user when the newly-edited page is first requested from the web server, but won't again unless the page requested is updated further.

The ASPX and other resource files are placed in a virtual host on an Internet Information Services server (or other compatible ASP.NET servers; see Other Implementations, below). The first time a client requests a page, the .NET framework parses and compiles the file(s) into a .NET assembly and sends the response; subsequent requests are served from the DLL files. By default ASP.NET will compile the entire site in batches of 1000 files upon first request. If the compilation delay is causing problems, the batch size or the compilation strategy may be tweaked.

Developers can also choose to pre-compile their code before deployment, eliminating the need for just-in-time compilation in a production environment.

[edit] Extension
Microsoft has released some extension frameworks that plug into ASP.NET and extend its functionality. Some of them are:

ASP.NET AJAX
An extension with both client-side as well as server-side components for writing ASP.NET pages that incorporate AJAX functionality.
ASP.NET MVC Framework
An extension to author ASP.NET pages using the MVC architecture.

[edit] ASP.NET compared to ASP classic
ASP.NET attempts to simplify developers' transition from Windows application development to web development by offering the ability to build pages composed of controls similar to a Windows user interface. A web control, such as a button or label, functions in very much the same way as its Windows counterpart: code can assign its properties and respond to its events. Controls know how to render themselves: whereas Windows controls draw themselves to the screen, web controls produce segments of HTML and JavaScript which form part of the resulting page sent to the end-user's browser.

ASP.NET encourages the programmer to develop applications using an event-driven GUI model, rather than in conventional web-scripting environments like ASP and PHP. The framework attempts to combine existing technologies such as JavaScript with internal components like "ViewState" to bring persistent (inter-request) state to the inherently stateless web environment.

参考资料:http://www.theregister.co.uk/2007/10/30/asp_net_java_project_cool/

参考技术A DotNetNuke is an open source web application framework ideal for creating, deploying and managing interactive web, intranet and extranet sites. The combination of an enterprise portal, built-in content management system, elegant skinning engine, and the ability to display static and dynamic content makes DotNetNuke an essential tool for ASP.NET developers.

Overview
Fully dynamic web site allows for an unlimited number of Pages
Pages can contain an unlimited number of Content regions and Content types
Advanced Content Management enabled via a standard Web Browser
Build an online Community with robust Membership Management
Secure your Content using advanced Roles and Permissions
Multi-tenancy allows for multiple Sites to be hosted from a single installation
License
Unrestricted Open Source BSD license
FREE use in non-commercial and commercial environment
Extensibility
Modular architecture enables hundreds of third party plug-in Modules
Designer-friendly Skinning engine for total site customization
Multiple database support through Providers
More than 70 Language Packs to support International users
Support
More than 550,000 registered users since Dec 24, 2002
Maintained and supported by DotNetNuke Corporation

http://www.dotnetnuke.com/portals/_default/Skins/DNN-Minimal/DotNetNuke%20Feature%20Sheet.pdf
网址是更详细的文件,可以看一下
参考技术B http://msdn.microsoft.com/en-au/asp.net/default.aspx

多了去了

以上是关于求学习asp的方法?的主要内容,如果未能解决你的问题,请参考以下文章

轮椅上的博士矣晓沅:9 年求学路,我从清华毕业了

软测工程师·求学篇——转行尚未成功,学习仍需努力!

求学 | PHP与C语言哪个更适合初学者学习?

求学之路

求学贵在主动坚持——兼谈学生行为礼仪

AI时代,智能硬件如何照亮求学之路