易截截图软件、单文件、免安装、纯绿色、仅160KB

C#取得域名以及目录地址的方法

using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
namespace SinvanCMS.Common
{
    /// <summary>
    /// 全局类,当前域名,物理路径
    /// </summary>
    public class Application
    {
        /// <summary>
        /// 获得url路径, http://localhost/www_dalian/fangyuan.asp 的app部分如:http://localhost/www_dalian
        /// </summary>
        public static string AppUrl
        {
            get
            {
                return "http://" + System.Web.HttpContext.Current.Request.Url.Host.ToString() + AppSiteName;
            }
        }
        /// <summary>
        /// 获得 http://localhost/www_dalian/fangyuan.asp 的 部分如:www_dalian
        /// </summary>
        public static string AppSiteName
        {
            get
            {
                string SiteAddress = "";
                SiteAddress = System.Web.HttpContext.Current.Request.ApplicationPath.ToString();
        


相关文档:

C#里的treeview控件如何能绑定数据库里的数据

应用程序,窗体里拖放一个TreeView控件,想把数据库里的数据在这个控件里显示出来
  TREEVIEW控件是Winfrom窗体里的 不是ASP.NET里的TREEVIEW
代码如下:
CREATE TABLE CateTable (
      [ID] [int] IDENTITY (1, 1) NOT NULL ,
       [CateName] [nv ......

常见的C#面试题


 
1. 简述 private、 protected、 public、 internal 修饰符的访问权限。答 . private : 私有成员, 在类的内部才可以访问。 protected : 保护成员,该类内部和继承类中可以访问。 public : 公共成员,完全公开,没有访问限制。 internal: 在同一命名空间内可以访问。2 .列举ASP.NET 页面之间传递值的几种方式。 答. ......

C#调用SQL存储过程以及返回值和参数的获取

QZone Editor
.dump{}

//TODO 域名
if (location.hash) {
document.domain=location.hash.substr(1);
}

//parent.qZEditor.callback();
function init(){
//获取编辑器面板ID
var pid = frameElement.panelID;

//获取编辑器面板对象 ......

VB/C++/C#串口通讯源代码【附详细注释】


VB
    If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
    MSComm1.CommPort = i1
    MSComm1.PortOpen = True
    MSComm1.InputMode = comInputModeBinary
    MSComm1.InBufferCount = 0
& ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号