第一个ASP页面。
Note Pad输入下面的程序。
1@ Language=VBScript
1 Response.ContentType="text/vnd.wap.wml"
1<wml>
2<card id="main">
3<p>
4Hello
5</p>
6</card>
7</wml>
保存为hello.asp。并且是它和hello.wml在同一个子目录下。
启动你的IIS服务器管理。在“默认的Web站点”下找到“wap”目录,用鼠标右键点击它,选择属性“Properties”,就会弹出一
个对话框,里面有好多配置选项。 在“虚拟目录”标签页当中有一项应用程序设置。将“许可”一项设置为:“执行(包括脚
本)”。确定后,退出IIS Console。
打开WinWap,马上Stop它,在URL栏里输入:“http://127.0.0.1/wap/hello.asp”,并按下回车。等着欣赏你的第一个ASP页
面。
动态生成WBMP
WBMP的具体解释请参看该部分的ISAPI的例子。
1@ Language=VBScript
1
2Function StoB(varstr)
3str2bin = ""
4For i = 1 To Len(varstr)
5varchar = Mid(varstr, i, 1)
6str2bin = str2bin & ChrB(AscB(varchar))
7Next
8StoB = str2bin
9End Function
10img=chr(0) & chr(0) & chr(5) & chr(2) & chr(0) & chr(&Hf8)
11
12Response.ContentType="image/vnd.wap.wbmp"
13Response.BinaryWrite stob(img)
——————————————————