Results 1 to 7 of 7

Thread: Change border properties of ASCX from code-behind?

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    May 2008
    Posts
    41

    Change border properties of ASCX from code-behind?

    Hi
    I am building a library of asp.net user controls which I am deriving from a custom UserControlBase class which further derives from actual UserControl class. Hierarchy looks like this :

    ASCX -> UserControlBase : UserControl

    I have this requirement to put a border around all the ASCX's. So, I thought if I can modify UserControlBase it will apply to all ASCXs. I tried following code in Page_Load of UserCOntrolBase but its not working

    Code:
    this.Attributes.Add("style", "border-color:#FFFF66;border-width:4px;border-style:Dashed;");
    What should I do to make it work? Please advise.

    Thanks
    AJ
    Last edited by mittalpa; Feb 25th, 2010 at 02:13 PM. Reason: format code

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width