Esempio n. 1
0
        /*
         * Function: Get the wrapper Id. Either use default ID based on client id, or if WrapperId provided as an ID, ie starting with #, then use wrapperId
         */
        private String GetWrapperId()
        {
            String sReturn = "";

            String sID = this.ClientID;

            //if no wrapperId provided with admin, then use client Id
            if (String.IsNullOrEmpty(WrapperId))
            {
                sReturn = sID;
            }
            else
            {
                WrapperId = WrapperId.Trim();

                //if we have a valid Id provided in WrapperId, then we can use
                if (WrapperId.StartsWith("#") && WrapperId.Length > 1)
                {
                    sReturn = WrapperId.Substring(1, WrapperId.Length - 1);
                }
                else                 //otherwise revert to client Id
                {
                    sReturn = sID;
                }
            }

            return(sReturn.Replace("_", ""));
        }
Esempio n. 2
0
        /*
         * Function: Get a wrapper class if one provided in WrapperId.
         */
        private String GetWrapperClass()
        {
            String sReturn = "";

            //if no wrapperId provided with admin, then use client Id
            if (!String.IsNullOrEmpty(WrapperId))
            {
                WrapperId = WrapperId.Trim();

                //if we have a valid Id provided in WrapperId, then we can use
                if (WrapperId.StartsWith(".") && WrapperId.Length > 1)
                {
                    sReturn = WrapperId.Substring(1, WrapperId.Length - 1);
                }
            }

            return(sReturn);
        }