仓酷云

标题: ASP网页编程之ASP中工夫收罗源程序 [打印本页]

作者: 飘灵儿    时间: 2015-1-16 23:22
标题: ASP网页编程之ASP中工夫收罗源程序
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
ASP的语言不仅仅只是命令格式差不多,而是包含在<%%>之内的命令完全就是VB语法。虽然ASP也是做为单独的一个技术来提出的,但他就是完全继承了VB所有的功能。
作者: 若相依    时间: 2015-1-29 06:33
你可以通过继承已有的对象最大限度保护你以前的投资。并且C#和C++、Java一样提供了完善的调试/纠错体系。
作者: 莫相离    时间: 2015-2-5 20:50
ASP.Net摆脱了以前ASP使用脚本语言来编程的缺点,理论上可以使用任何编程语言包括C++,VB,JS等等,当然,最合适的编程语言还是MS为.NetFrmaework专门推出的C(读csharp),它可以看作是VC和Java的混合体吧。
作者: 深爱那片海    时间: 2015-2-13 10:57
多看多学多思。多看一些关于ASP的书籍,一方面可以扩展知识面一方面可以鉴借别人是如何掌握、运用ASP的;多学善于关注别人,向同学老师多多学习,不论知识的大小;多思则是要将学到的知识灵活运用。
作者: 柔情似水    时间: 2015-3-3 20:07
运用经典的例子。并且自己可以用他来实现一些简单的系统。如果可以对他进行进一步的修改,找出你觉得可以提高性能的地方,加上自己的设计,那就更上一个层次了,也就会真正地感到有所收获。
作者: 因胸联盟    时间: 2015-3-11 13:01
ASP.Net和ASP的最大区别在于编程思维的转换,而不仅仅在于功能的增强。ASP使用VBS/JS这样的脚本语言混合html来编程,而那些脚本语言属于弱类型、面向结构的编程语言,而非面向对象,这就明显产生以下几个问题:
作者: 谁可相欹    时间: 2015-3-18 11:53
Response:从字面上讲是“响应”,因此这个是服务端向客户端发送东西的,例如Response.Write
作者: admin    时间: 2015-3-25 20:22
运用经典的例子。并且自己可以用他来实现一些简单的系统。如果可以对他进行进一步的修改,找出你觉得可以提高性能的地方,加上自己的设计,那就更上一个层次了,也就会真正地感到有所收获。




欢迎光临 仓酷云 (http://ckuyun.com/) Powered by Discuz! X3.2