|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
ASP.NET和ASP的比较,技术上比较已经没什么可说的了.新一代在大部分程度来说当然是比旧一代好了.关键看你对所做软件的理解了.因人而定.会写的话也可能比ASP.NET写得更有效率和更方便重用准时UsingASPandHTMLMetaTAGSToMakeADynamicDelayMessage
Thisisalittletricktodisplayatimedmessagetotheuserafterdoingsomesortoftask.Bymixing
somecreativeASPwithasimpleHTMLMETARefreshyoucandisplayamessagetoauserforaspecified
periodoftimeandthenredirectthembacktowhereveryouwant.
METAtagswithanHTTP-EQUIVattributeareequivalenttoHTTPheaders.Usually,theycontroltheactionof
browsers,andmaybeusedtorefinetheinformationprovidedbytheactualheaders.
Hereishowitworks.
AftercompletingsomesortofASPcode.(Possiblyadatabaseupdate).
Youcanredirecttheuserlikesotothedelaypage.
First,turnonbufferingbecauseyoullprobablyneeditdependingonwhereinyourpageyouredirect.
Putthisatthetopofyourpagebeforethe<HTML>Tag.
<%Response.Buffer=True%>
Thenwhenyouarereadytosendtheusertothedelaypagedosomethinglikethis.
<%MYMESSAGE=Server.URLEncode("AddingNewProduct....PleaseWait")%>
<%Response.Redirect("delay.asp?DELAY_TIME=3&DELAY_MESSAGE="&MYMESSAGE&"&REDIRECT_URL=default.asp")%>
Asyouseecanseethereare3variableswesendtothedelaypage.
DELAY_TIME
REDIRECT_URL
DELAY_MESSAGE
Thenthedelay.asppagewouldconsistofthefollowingcode.
<%@LANGUAGE="VBSCRIPT"%>
<%
DELAY_TIME=Request("DELAY_TIME")
REDIRECT_URL=Request("REDIRECT_URL")
DELAY_MESSAGE=Request("DELAY_MESSAGE")
%>
<html>
<head>
<metahttp-equiv="Refresh"content="<%=DELAY_TIME%>;URL=<%=REDIRECT_URL%>">
<title>Delay</title>
</head>
<bodycolor="#FFFFFF">
<fontface="Arial"><palign="center"><strong><%=DELAY_MESSAGE%></strong></p></font>
</body>
</html>
</p>源代码保护方面其实现在考虑得没那么多了..NET也可以反编译.ASP写得复杂的话别人能看得懂的话.他也有能力自己写了.这方面担心的倒不太多.纵观现在网上可以下载的那些所谓BBS还有什么网站等等的源代码 |
|