后来通过咨询Lori知道页面需要从CVCommunity.Kernel.BasePage类派生,但是问题依然如故,后来终于恍然大悟,原来是这样的.
我的论坛在BBS目录下,我做的登陆页在根目录首页下,那个conn参数需要读web.config里面的两条数据,我根目录下的web.config里没有加上,所以总是出错.
现在我提供一下我的方法:
如果论坛是放在单独的目录下,那么需要在站点根目录下的web.config里加上这两句:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="DbProvider" value="CVCommunity.Provider.OleDbFactory, CVCommunity.Provider" />
<add key="DbLink" value="//bbs/data/db.ascx" /> '假设你的论坛目录是BBS
</appSettings>
</configuration>
然后把BBS目录下的web.config里的这两行删掉,否则会造成重复导致路径错误
在操作登陆的页中,修改这里:
Imports CVCommunity.Provider
Imports CVCommunity.Kernel
Imports CVCommunity.Kernel.DALFactory
Imports CVCommunity.Kernel.Handlers
Imports CVCommunity.Kernel.Entity
Partial Class _Default
Inherits CVCommunity.Kernel.BasePage '这里也是关键
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'这样,就可以使用conn对象了
End Sub
End Class
[该帖子由作者于2007年12月31日 21:51:08最后编辑]




博客
资料
短消息
搜索
加为好友
成为Fans
选择省份

