Go homepage(回首页)
Upload pictures (上传图片)
Write articles (发文字帖)

The author:(作者)归海一刀
published in(发表于) 2014/1/30 1:36:58
收集ASP转ASP.NET过程典型问题_[Asp.Net教程]

收集ASP转ASP.NET过程典型问题_[Asp.Net教程]
1、在asp.net中路径中 "~" 波浪号表示什么含义?
A:是你的虚拟目录的根 .
比如你的虚拟目录是 http://localhost/web 那么 ~/aaa/index.html 就 是 http://localhost/web/aaa/index.html

2 使用c#给服务器控件的客户端事件绑定JS处理程序的方法?
wctl.Attributes.Add("onfocus", string.Format("this.className = ’{0}’;", className));

编程html后的代码为;

onfocus="this.className=’className’"

使用C#代码读取web.config文件中的配置节

demo:


providerName="System.Data.SqlClient" />


1 引用using System.Web.Configuration命名空间

2 string connectionString =ConfigurationManager.ConnectionStrings["dbConnectionString"].ConnectionString;


If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)





QQ:154298438
QQ:417480759