zoukankan      html  css  js  c++  java
  • 从ASP转到ASP.NET过程中常见问题收集

      做了2年多asp。09打算转向.NET先将学习过程中遇到的问题和解决的办法写出来提醒自己和后来者少走弯路

       1、Q:请问在asp.net中路径中   "~"   波浪号表示什么含义?
       A:是你的虚拟目录的根 .
       比如你的虚拟目录是 http://localhost/web  那么   ~/aaa/index.html   就  是  http://localhost/web/aaa/index.html 
      参考:http://topic.csdn.net/t/20060309/13/4603073.html
      关键字asp.net 路径 波浪 
      引擎:Google
    2 使用c#给服务器控件的客户端事件绑定JS处理程序的方法?

     wctl.Attributes.Add("onfocus", string.Format("this.className = '{0}';", className));

    编程html后的代码为;

    onfocus="this.className='className'"

    18:11 2009-3-1:使用C#代码读取web.config文件中的<connectionStrings>配置节

    demo:

     <connectionStrings>
      <add name="test_dbConnectionString" connectionString="Data Source=PROGRAME-8P1PK1;Initial Catalog=test_db;User ID=sa;Password=000000"
       providerName="System.Data.SqlClient" />
     </connectionStrings>

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

    2 string connectionString =ConfigurationManager.ConnectionStrings["dbConnectionString"].ConnectionString;
    参考:http://www.1-100.org/AspNet/25018.htm

    关键字:connectionStrings asp.net

  • 相关阅读:
    导出表结构
    smarty cache
    浏览器插件
    互联网技术网站介绍
    目录拷贝
    sphinx搜索不到
    powerdesigner 导出数据库表结构
    PowerDesigner 连接 mysql
    update join
    ClipboardJS的坑,
  • 原文地址:https://www.cnblogs.com/rentj1/p/1370726.html
Copyright © 2011-2022 走看看