zoukankan      html  css  js  c++  java
  • 2007年3月小记

    1、使用System.Web.Hosting.HostingEnvironment.MapPath方法也可以获取"~/path/*.*"文件的绝对路径。
    2、在IIS7使用ASP.NET AJAX时,网站的应用程序池必须设置为集成模式(integrated)
    3、SQL数据库远程链接。

        --远程链接获取信息
        EXEC sp_addlinkedserver 
            
    @server='ls_instance',--别名
            @provider='SQLOLEDB',
            
    @srvproduct='',
            
    @datasrc='www.cnblogs.com'--远程服务器名

        
    EXEC sp_addlinkedsrvlogin 
            
    @rmtsrvname='ls_instance',
            
    @useself='false',
            
    @locallogin='sa',
            
    @rmtuser='sa',
            
    @rmtpassword='123456'


        
    EXEC sp_droplinkedsrvlogin 'ls_instance''sa'
        
    --EXEC sp_linkedservers
        EXEC sp_dropserver 'ls_instance'

    4、如何在VS2005 SP1中打开HTML编辑器中的元素的属性显示?
          工具-->选项-->文本编辑器-->HTML-->杂项-->选择“在源视图中启用属性网格”
     
    5、导出某列表控件到一个Excel表格

        public void ToExcel(System.Web.UI.Control ctl)
        
    {
            Response.Clear();
            Response.AppendHeader(
    "Content-Disposition""attachment;filename=Excel.xls");
            Response.Charset 
    = "GB2312";
            Response.ContentEncoding 
    = System.Text.Encoding.GetEncoding("GB2312");
            Response.ContentType 
    = "application/ms-excel";
            ctl.Page.EnableViewState 
    = false;
            System.IO.StringWriter tw 
    = new System.IO.StringWriter();
            System.Web.UI.HtmlTextWriter hw 
    = new System.Web.UI.HtmlTextWriter(tw);
            ctl.RenderControl(hw);
            HttpContext.Current.Response.Write(tw.ToString());
            HttpContext.Current.Response.End();
        }

    6、简单判断是否为IE。 if(!document.uniqueID) window.location = window.location;

    7、在ASP.NET AJAX中如何判断浏览器及计算其宽高。
                function getClientBounds()
                
    {
                    
    var clientWidth;
                    
    var clientHeight;
                    
    switch(Sys.Browser.agent) {
                        
    case Sys.Browser.InternetExplorer:
                            clientWidth 
    = document.documentElement.clientWidth;
                            clientHeight 
    = document.documentElement.clientHeight;
                            
    break;
                        
    case Sys.Browser.Safari:
                            clientWidth 
    = window.innerWidth;
                            clientHeight 
    = window.innerHeight;
                            
    break;
                        
    case Sys.Browser.Opera:
                            clientWidth 
    = Math.min(window.innerWidth, document.body.clientWidth);
                            clientHeight 
    = Math.min(window.innerHeight, document.body.clientHeight);
                            
    break;
                        
    default:  // Sys.Browser.Firefox, etc.
                            clientWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);
                            clientHeight 
    = Math.min(window.innerHeight, document.documentElement.clientHeight);
                            
    break;
                    }


                    
    return new Sys.UI.Bounds(00, clientWidth, clientHeight);
                }

    8、Vista侧边栏安装与配置
    9、Passport学习:
    Passport 身份验证 
    在ASP.NET应用程序中集成Passport验证

  • 相关阅读:
    黄聪:C#使用能够foreach对hashtable、List遍历时“集合已修改;可能无法执行枚举操作。”错误
    黄聪:[C#]如何获取变量的名字,不是值,是名称。返回名字的字符串
    黄聪:js 获取浏览器、Body、滚动条、可见区域、页面、边框、窗口高度和宽度值(多浏览器)
    黄聪:WIN7下回收站不小心删除的文件怎么恢复,免费数据恢复软件下载
    黄聪:中国大陆的所有IP段,中国电信所有IP段、中国铁通所有IP段、中国网通所有IP段。
    黄聪:将自己开发的插件发布到WordPress官方插件站(转)
    黄聪:利用iframe实现ajax 跨域通信的解决方案(转)
    python 画任意多边形
    python 绘图加上文字
    Python将多张图片进行合并拼接
  • 原文地址:https://www.cnblogs.com/chenjunbiao/p/1760241.html
Copyright © 2011-2022 走看看