补充一点:操作系统是win2000 advanced server
解决方案 »
- 简单问题,如何清理listBox
- ILIST Contains 为什么总返回FALSE
- 怎么在windows窗体上绘制用户控件??
- Composite UI Application Block 的问题
- 请高手指点:怎么样用API获取窗口的标题栏、边框,然后自定义标题栏边框的外观
- 代码生成工具 源码和设计都公开 欢迎高手指教
- 一个对话框程序中,如何让 dropdownlist 控件不能直接输入文本,而只能下拉选择呢?
- 请问判断一个字符串是否在另一个字符串中的函数是什么?
- 请问如何注册.NET的DLL到全局缓冲区,以后开工程可以直接在工具箱使用?
- C#调用CHM帮助文件
- 请帮我看看这个继承关系中的构造函数初始化匹配的问题,谢谢!
- 请求各位高手,对于后台管理页面在远端访问时不能显示,在服务器管理一切正常
换成LYL\\MYIN或者
string StrCon=@"Server=LYL\MYINS;Database=test;User ID=sa;Password=111;Trusted_Connection=False";
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1519: Invalid token '(' in class, struct, or interface member declarationSource Error: Line 4: string StrCon=@"Server=LYL\MYINS;Database=test;User ID=sa;Password=111;Trusted_Connection=False";
Line 5: SqlConnection SqlCon=new SqlConnection(StrCon);
Line 6: SqlCon.Open();
Line 7: </script> Source File: c:\inetpub\wwwroot\lyl\datatest.aspx Line: 6 这是把LYL\MYINS换成LYL\\MYINS后的出错情况:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1519: Invalid token '(' in class, struct, or interface member declarationSource Error: Line 4: string StrCon="Server=LYL\\MYINS;Database=test;User ID=sa;Password=111;Trusted_Connection=False";
Line 5: SqlConnection SqlCon=new SqlConnection(StrCon);
Line 6: SqlCon.Open();
Line 7: </script> Source File: c:\inetpub\wwwroot\lyl\datatest.aspx Line: 6
严重迷惑,难道你把它写成全角括号了?
<%@Import Namespace="System.Data.SqlClient"%>
<script language="c#" runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
string StrCon=@"Server=LYL\MYINS;Database=test;User
ID=sa;Password=111;Trusted_Connection=False";
SqlConnection SqlCon=new SqlConnection(StrCon);
SqlCon.Open();
}
</script>写成这样试试