那位大哥可以使我VB使用Cookies??
我要像IE那和使用Cookies 问题点数:100、回复次数:4Top
1 楼seakingx(亚龙湾)回复于 2003-12-03 09:07:13 得分 0
我只知道ASP中控制COOKIES
顶
Top
2 楼online(龙卷风V4.0--决战江湖(MS MVP-VB))回复于 2003-12-03 12:41:28 得分 100
具体没有试过
asp中可以操作,vb也没有问题
从菜单中选择"工程",然后在其中选择"引用",就会出现"引用"窗口从中选择Microsoft Active Server Pages Object Library.
定义
Private MyScriptingContext As ScriptingContext
Private MyApplication As Application
Private MyRequest As Request
Private MyResponse As Response
Private MyServer As Server
Private MySession As Session
比如,我们经常在ASP中用Request.form()来收集提交表单的数据.现在我们在我们的VB中实现这个功能,代码如下:
用ASP中实现:
〈%
MyTempVariable = Request.Form("userName")
Response.Write ("you entered "& MyTempVariable & "as your user name")
%>
在VB中实现:
MyTempVariable = MyRequest.Form("userName")
MyResponse.Write ("you entered "& MyTempVariable & "as your user name")
通过使用MyResponse来代替Response,我们能够使用所有Response的方法
Top
3 楼zmartin(迷路少年)回复于 2003-12-03 12:52:16 得分 0
谢大哥了!!Top
4 楼rainstormmaster(暴风雨 v2.0)回复于 2003-12-03 13:00:52 得分 0
工程 引用“Microsoft Active Server Pages Object Library”
通过上述引用,在程序中就可以访问ScriptingContext对象,从而能够使用在ASP页面中的5个对象:Request, Response, Session, Application 和 Server。
如果在列表中找不到“Microsoft Active Server Pages Object Library”,点击“Browse”按钮定位寻找。ASP库引用实际上就是一个后缀为.tlb的文件,默认的路径应该位于:\Program Files\Microsoft Visual Studio\ Common IDE\IDE98\ASP.TLBTop




