예제 #1
0
    private string SetImage()
    {
        string retVal = ImageUrl;

        if (ImageUrl == "")
        {
            switch (Type)
            {
            case LinkType.Url:
                int i = NavigateUrl.IndexOf('?');
                diIcon.FileName = (i > -1) ? NavigateUrl.Substring(0, i) : NavigateUrl;
                break;

            case LinkType.Document:
                diIcon.Visible  = true;
                diIcon.FileName = NavigateUrl;
                break;

            case LinkType.Folder:
                //hlSygmaImg.ImageUrl = FOLDER_IMAGE;
                diIcon.Visible   = true;
                diIcon.Extension = "folder";
                break;

            default:
                //hlSygmaImg.ImageUrl = FORM_IMAGE;
                diIcon.Visible   = true;
                diIcon.Extension = "form";
                break;
            }
        }
        return(retVal);
    }
예제 #2
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            if (string.IsNullOrEmpty(NavigateUrl))
            {
                NavigateUrl = "javascript:void(0);";
            }
            else
            {
                NavigateUrl = (IsLinkEncrypt && (NavigateUrl.IndexOf("md=") < 0)) ? CCUtilsComplex.UrlMD5(NavigateUrl) : NavigateUrl;
            }
        }