您正在查看 "asp,asp.net" 分类下的文章
2009-11-02 10:12
Server.URLEncode(“飞的更高”) 中文编码
解码函数:
function urldecode(encodestr)
Dim newstr,havechar,lastchar,i,char_c,next_1_c,next_1_Num
newstr=""
havechar=false
lastchar=""
for i=1 to len(encodestr)
char_c=mid(encodestr,i,1)
if char_c="+" then
newstr=newstr & " "
elseif char_c="%" then
next_1_c=mid(encodestr,i+1,2)
|
2009-11-01 23:42
第一步:下载eWebEditor2.8 修正版
下载地址http://ewebeditor.webasp.net/download.asp
解压放到项目文件目录下. 为了方便使用我把文件改名为ewebeditor
第二步:修改相关调用到编辑器的ASP文件
<iframe ID="Editor" src="ewebeditor/ewebeditor.asp?Id=NewsContent&style=s_newssystem" frameborder="0" scrolling="no" width="100%" HEIGHT="100%"></iframe>
|
2009-10-29 16:14
随着网站访问量的加大,每次从数据库读取都是以效率作为代价的,很多用ACCESS作数据库的更会深有体会,静态页加在搜索时,也会被优先考虑。互联网上流行的做法是将数据源代码写入数据库再从数据库读取生成静态面,这样无形间就加大了数据库。将现有的ASP页直接生成静态页,将会节省很多。
下面的例子是将、index.asp?id=1/index.asp?id=2/index.asp?id=3/这三个动态页面,分别生成ndex1.htm,index2.htm,index3.htm存在根目录下面
<%
dim strUrl,Item_Classid,id,FileName,FilePath,Do_Url |
2009-09-28 17:03
DataBinder.Eval的基本格式
在绑定数据时经常会用到这个句程序:<%# DataBinder.Eval(Container.DataItem,"xxxx")%>或者<%# DataBinder.Eval(Container,"DataItem.xxxx")%>
今天又学到一种,而且微软也说这种方法的效率要比以上两种高。
<%# ((DataRowView)Container.DataItem)["xxxx"]%>
很有用的,这样可以在前台页面做好多事情了。
还要记住要这样用必须要在前台页面导入名称空间System.Data,否则会生成错误信息。
|
|
|