仓酷云

标题: ASP网页设计使用C#在SQL Server2000存取图象 For W... [打印本页]

作者: 金色的骷髅    时间: 2015-1-16 23:36
标题: ASP网页设计使用C#在SQL Server2000存取图象 For W...
Windows本身的所有问题都会一成不变的也累加到了它的身上。安全性、稳定性、跨平台性都会因为与NT的捆绑而显现出来;server|window关头代码:

<%
setconn=server.createobject("ADODB.CONNECTION")
connstr="DBQ="+server.mappath("db1.mdb")+";DefaultDir=;DRIVER={MicrosoftAccessDriver(*.mdb)};"
conn.openconnstr
functionmenu(id)
setrs=server.CreateObject("adodb.recordset")
sql="select*frommenuwhereid1="&id&"orderbyurl,id"
rs.opensql,conn,1,1
ifrs.recordcount=0then
rs.close
setrs=nothing
exitfunction
endif
response.write("<tableborder=0cellspacing=0cellpadding=0>")
i=1
whilenotrs.eof
iflen(rs("url"))>0then
ifi=rs.recordcountthen
menutype="file1"
else
menutype="file"
endif
menuname="<ahref="&rs("url")&"target=_blank>"&rs("menuname")&"</a>"
onmouseup=""
else
ifi=rs.recordcountthen
menutype="menu3"
listtype="list1"
onmouseup="with(eval(id"&rs("id")&"))if(style.display==){style.display=none;this.className=menu3;}else{style.display=;this.className=menu4;}"
else
menutype="menu1"
listtype="list"
onmouseup="with(eval(id"&rs("id")&"))if(style.display==){style.display=none;this.className=menu1;}else{style.display=;this.className=menu2;}"
endif
menuname=rs("menuname")
endif
%>
<tr>
<tdclass="<%=menutype%>"onMouseUp="<%=onmouseup%>"><%=menuname%></td>
</tr>
<%iflen(rs("url"))<3then%>
<trid="id<%=rs("id")%>"style="display:none">
<tdclass="<%=listtype%>"><%menu(rs("id"))%></td>
</tr>
<%
endif
rs.movenext
i=i+1
wend
response.write("</table>")
rs.close
setrs=nothing
endfunction
%>
<html>
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=gb2312">
<title>=========无穷级目次树=========http://bbs.asp2004.net</title>
<styletype="text/css">
<!--
.menu1{
background-image:url(folder1.gif);
background-repeat:no-repeat;
height:17px;
left:32px;
padding-left:32px;
cursor:hand;
}
.menu2{
background-image:url(folder2.gif);
background-repeat:no-repeat;
height:17px;
left:32px;
padding-left:32px;
cursor:hand;
}
.menu3{
background-image:url(folder3.gif);
background-repeat:no-repeat;
height:17px;
left:32px;
padding-left:32px;
cursor:hand;
}
.menu4{
background-image:url(folder4.gif);
background-repeat:no-repeat;
height:17px;
left:32px;
padding-left:32px;
cursor:hand;
}
.list{
padding-left:20px;
background-image:url(list.gif);
background-repeat:repeat-y;
}
.list1{
padding-left:20px;
}
.file{
background-image:url(file.gif);
background-repeat:no-repeat;
height:16px;
cursor:hand;
padding-left:32px;
}
.file1{
background-image:url(file1.gif);
background-repeat:no-repeat;
height:16px;
cursor:hand;
padding-left:32px;
}
body{
font-size:9pt;
color:#000000;
background-color:#FFFFFF;
}
a:link{
font-size:9pt;
color:#000000;
text-decoration:none;
}
a:visited{
font-size:9pt;
color:#000000;
text-decoration:none;
}
a:hover{
font-size:9pt;
color:#0000FF;
text-decoration:none;
position:relative;
right:1px;
bottom:1px;
}
a:active{
font-size:9pt;
color:#000000;
text-decoration:none;
}
-->
</style>
<metaname="keywords"content="asp2004,树,菜单,无穷级">
<metaname="author"content="小灰,quxiaohui_0@163.com">
</head>
<body>
<ahref="http://bbs.asp2004.net/"target="_blank">http://bbs.asp2004.net/</a>提</p>国内有些大的CRM厂商的ASP就写得不错.无论是概念还是它里面用JAVASCRIPT的能力.并不是说现在的程序员用了ASP.NET来写程序就可以说自己高档了
作者: 冷月葬花魂    时间: 2015-1-20 10:23
用户端的浏览器不需要提供任何别的支持,这样大提高了用户与服务器之间的交互的速度。
作者: 只想知道    时间: 2015-1-24 11:40
多看多学多思。多看一些关于ASP的书籍,一方面可以扩展知识面一方面可以鉴借别人是如何掌握、运用ASP的;多学善于关注别人,向同学老师多多学习,不论知识的大小;多思则是要将学到的知识灵活运用。
作者: 若天明    时间: 2015-2-1 09:46
他的语法和设计思路和VB完全相同,导致很多ASP的书都留一句“相关内容请参考VB的相关教材....”更糟糕的是,相当多的ASP教程混合了Javascript,VBscript等等脚本语言,搞的初学者。
作者: admin    时间: 2015-2-2 21:38
如何学好ASP,以前也有人问过,把回答给你转过来看看能否对你有帮助:
作者: 乐观    时间: 2015-2-8 06:34
封装性使得代码逻辑清晰,易于管理,并且应用到ASP.Net上就可以使业务逻辑和Html页面分离,这样无论页面原型如何改变,业务逻辑代码都不必做任何改动;继承性和多态性使得代码的可重用性大大提高。
作者: 柔情似水    时间: 2015-2-24 17:47
ASP主要是用好六个对象,其实最主要的是用好其中两个:response和request,就可以随心所欲地控制网页变换和响应用户动作了。
作者: 海妖    时间: 2015-3-7 12:52
代码逻辑混乱,难于管理:由于ASP是脚本语言混合html编程,所以你很难看清代码的逻辑关系,并且随着程序的复杂性增加,使得代码的管理十分困难,甚至超出一个程序员所能达到的管理能力,从而造成出错或这样那样的问题。
作者: 若相依    时间: 2015-3-15 05:49
他的语法和设计思路和VB完全相同,导致很多ASP的书都留一句“相关内容请参考VB的相关教材....”更糟糕的是,相当多的ASP教程混合了Javascript,VBscript等等脚本语言,搞的初学者。
作者: 变相怪杰    时间: 2015-3-21 19:05
封装性使得代码逻辑清晰,易于管理,并且应用到ASP.Net上就可以使业务逻辑和Html页面分离,这样无论页面原型如何改变,业务逻辑代码都不必做任何改动;继承性和多态性使得代码的可重用性大大提高。




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