index.asp页:
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="<%=db%>"
SelectCommand="SELECT [Info_CreateDateTime], [Info_Content], [Info_UpdateDateTime] FROM [TB_Info]">
</asp:AccessDataSource>index.asp.cs页:
protected string db;
db = "f:/web/app_data/data.mdb";为什么得不到:
DataFile="f:/web/app_data/data.mdb"报错:
“Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: Illegal characters in path.”
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="<%=db%>"
SelectCommand="SELECT [Info_CreateDateTime], [Info_Content], [Info_UpdateDateTime] FROM [TB_Info]">
</asp:AccessDataSource>index.asp.cs页:
protected string db;
db = "f:/web/app_data/data.mdb";为什么得不到:
DataFile="f:/web/app_data/data.mdb"报错:
“Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: Illegal characters in path.”
解决方案 »
- C#关于用Fileupload控件上传图片的问题。
- modbus协议 基于UDP/IP 与PLC通讯 问题
- 您还在为找不到所需的示例代码而苦恼吗?微软全新示例代码请求服务
- 《Framework的设计与应用--基于Windows Forms的应用开发实践》
- 关于远程链接sql2005的链接字符串的写法
- 如何制作一个永远走动,走完后自动重新开始的进度条?
- 这一小段代码怎么不能执行啊?
- 悬赏100分,为什么我编的C#应用程序越运行越慢
- 请教异步程序处理中的异常处理
- 我的问题是 我做了个项目 在本机上好使,但是上传到服务器的时候,
- “fsdy2000(乡愁) 写的串口发送有问题,” +++++100问题!超级送分!! 串口发送数据出现乱码++++++
- C#webform中TreeView控件结点的id怎么存?
而且直接写DataFile="f:/web/buyerdata/app_data/data.mdb"能够通过
但是改成DataFile="<%=db%>"就出错了