&this.MapPath("chat")你把这个直接换成文件的路径
解决方案 »
- 为什么用FindControl找不到单选按钮
- 学习.NET中的困惑
- VS05 ASP.NET工具组建
- 请问错误提示The GridView 'GridView1' fired event RowDeleting which wasn't handled的是因为什么造成的?
- (求助)IE窗口最小化的问题
- .NET高手进来 help me !
- 请问如何用一个winform的程序调用多个WebService??????急急急
- 一个asp的问题
- 怎样用Response.Write写一个javascript的弹出对话框???
- 字符和日期怎么样进行互转换?
- 后置代码问题
- 如何在asp.vb文件里读写iframe内嵌页面中控件的值???????????
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the application is started
Application("appconn") = New System.Data.OleDb.OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=" & Server.MapPath("database/liuyan.mdb"))
End Sub
引用的例子:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim cn As OleDbConnection = Application("appconn")
Dim sql As String = "select * from liuyan"
Dim da As OleDbDataAdapter = New OleDbDataAdapter(sql, cn)
Dim ds As New DataSet()
da.Fill(ds, "liuyan")
DataGrid1.DataSource = ds.Tables("liuyan").DefaultView
DataGrid1.DataBind() End Sub呵,,,就是这样的,兄弟.....
我正这样用着呢, 祝你也好运吧, 把分都给我吧...我接....
呵......
xml文件怎么能用MapPath函数呢?