仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 508|回复: 8
打印 上一主题 下一主题

[学习教程] ASP网页编程之ASP中工夫收罗源程序

[复制链接]
飘灵儿 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-1-16 23:22:33 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
asp对于服务器的要求较高,一般的服务器如果访问量一大就垮了,不得不重启。收罗|程序ThisisanASPpage,whichissupposedtobeopenedinanewbrowserwindow,itautomaticallyresizes
toaclientsresolution,displayingmonthviewwithapossibilitytopickadate,whichistheninserted
intoaopenerpagecontrol(likeinputtype"text"control),whosereferenceispassedasanargumentto
thisASPpage




code:
CantCopyandPastethis?
Clickhereforacopy-and-pastefriendlyversionofthiscode!



**************************************
Name:ASPDatePicker
Description:ThisisanASPpage,which
issupposedtobeopenedinanewbrowse
rwindow,itautomaticallyresizestoa
clientsresolution,displayingmonthvi
ewwithapossibilitytopickadate,wh
ichistheninsertedintoaopenerpage
control(likeinputtype"text"control)
,whosereferenceispassedasanargume
nttothisASPpage
By:VadimMaslov


Inputs:2possibleinputarguments:dat
etodisplaymonthfor(ifnone-today
smonthisautomaticdefault)+openerp
agecontrolname:calendar.asp?date=10/1
2/2000&ctl=calendar

Returns:None

Assumes:None

SideEffects:Codeprobablyneedstobe
adjustedifaserversRegionalsettings
arenotAmerican

Warranty:
codeprovidedbyPlanetSourceCode(tm)
(www.Planet-Source-Code.com)asis,wi
thoutwarrantiesastoperformance,fitn
ess,merchantability,andanyotherwarra
nty(whetherexpressedorimplied).
TermsofAgreement:
Byusingthissourcecode,youagreeto
thefollowingterms...
1)Youmayusethissourcecodeinper
sonalprojectsandmaycompileitintoa
n.exe/.dll/.ocxanddistributeitinbi
naryformatfreelyandwithnocharge.
2)YouMAYNOTredistributethissourc
ecode(forexampletoawebsite)witho
utwrittenpermissionfromtheoriginal
author.Failuretodosoisaviolationo
fcopyrightlaws.
3)Youmaylinktothiscodefromanot
herwebsite,provideditisnotwrapped
inaframe.
4)Theauthorofthiscodemayhavere
tainedcertainadditionalcopyrightrigh
ts.Ifso,thisisindicatedintheautho
rsdescription.
**************************************

<%@Language=VBScript%>
<%
OptionExplicit
ConstTOP_COORDINATE=30
DimcurDate
DimdaysCount
DimlastDay
DimfirstDay
Dimi
DimtopC
DimleftC
DimtempDate
DimcurMonth
DimcurYear
DimcalHTML
DimpDate
DimcurMonthText
DimrowCount
DimnextMonth
DimprevMonth
DimretControl
curDate=Request("date")
retControl=Request("ctl")
IfIsDate(curDate)ThenpDate=FormatDateTime(curDate,0)
IfcurDate=""Then
curDate=Now()
Else
IfIsDate(curDate)ThencurDate=Month(curDate)&"/"&Day(curDate)&"/"&Year
(curDate)
EndIf
IfIsDate(curDate)Then
curMonth=Month(curDate)
curMonthText=TextMonth(curMonth)&"-"&Year(curDate)
curYear=Year(curDate)
firstDay=curMonth&"/"&"01"&"/"&curYear
lastDay=DateAdd("d",-1,DateAdd("m",1,firstDay))
nextMonth=DateAdd("m",1,firstDay)
nextMonth=FormatDateTime(Month(nextMonth)&"/"&Day(curDate)&"/"&Year
(nextMonth),0)&_
"&ctl="&retControl
prevMonth=DateAdd("m",-1,firstDay)
prevMonth=FormatDateTime(Month(prevMonth)&"/"&Day(curDate)&"/"&Year
(prevMonth),0)&_
"&ctl="&retControl
daysCount=CInt(Day(lastDay))
Fori=1TodaysCount
tem</p>缺点:正版成本价格贵(盗版就不说了)、不够安全,大多数服务器用windows系统,没有linux安全
变相怪杰 该用户已被删除
沙发
发表于 2015-1-20 09:43:31 | 只看该作者
ASP的语言不仅仅只是命令格式差不多,而是包含在<%%>之内的命令完全就是VB语法。虽然ASP也是做为单独的一个技术来提出的,但他就是完全继承了VB所有的功能。
若相依 该用户已被删除
板凳
发表于 2015-1-29 06:33:48 | 只看该作者
你可以通过继承已有的对象最大限度保护你以前的投资。并且C#和C++、Java一样提供了完善的调试/纠错体系。
莫相离 该用户已被删除
地板
发表于 2015-2-5 20:50:41 | 只看该作者
ASP.Net摆脱了以前ASP使用脚本语言来编程的缺点,理论上可以使用任何编程语言包括C++,VB,JS等等,当然,最合适的编程语言还是MS为.NetFrmaework专门推出的C(读csharp),它可以看作是VC和Java的混合体吧。
深爱那片海 该用户已被删除
5#
发表于 2015-2-13 10:57:48 | 只看该作者
多看多学多思。多看一些关于ASP的书籍,一方面可以扩展知识面一方面可以鉴借别人是如何掌握、运用ASP的;多学善于关注别人,向同学老师多多学习,不论知识的大小;多思则是要将学到的知识灵活运用。
柔情似水 该用户已被删除
6#
发表于 2015-3-3 20:07:02 | 只看该作者
运用经典的例子。并且自己可以用他来实现一些简单的系统。如果可以对他进行进一步的修改,找出你觉得可以提高性能的地方,加上自己的设计,那就更上一个层次了,也就会真正地感到有所收获。
因胸联盟 该用户已被删除
7#
发表于 2015-3-11 13:01:28 | 只看该作者
ASP.Net和ASP的最大区别在于编程思维的转换,而不仅仅在于功能的增强。ASP使用VBS/JS这样的脚本语言混合html来编程,而那些脚本语言属于弱类型、面向结构的编程语言,而非面向对象,这就明显产生以下几个问题:
谁可相欹 该用户已被删除
8#
发表于 2015-3-18 11:53:48 | 只看该作者
Response:从字面上讲是“响应”,因此这个是服务端向客户端发送东西的,例如Response.Write
admin 该用户已被删除
9#
发表于 2015-3-25 20:22:40 | 只看该作者
运用经典的例子。并且自己可以用他来实现一些简单的系统。如果可以对他进行进一步的修改,找出你觉得可以提高性能的地方,加上自己的设计,那就更上一个层次了,也就会真正地感到有所收获。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-9-21 05:28

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表