How do I do this in codebehind (vb.net)??

Last post 11-01-2009 3:22 PM by Danish Ali. 2 replies.

Sort Posts:

  • How do I do this in codebehind (vb.net)??

    11-01-2009, 3:06 PM
    • Member
      169 point Member
    • icm63
    • Member since 10-23-2004, 11:32 PM
    • New Zealand
    • Posts 447
    <table  id="tabShowComments" border="2" cellpadding="0" cellspacing="0" width="940px"  style="height:auto; border:1px dotted black; border-collapse:collapse;"  runat="server">


     

    Change The "border:1px dotted black" to change the color to 'white'?? and or turn off the border. But I need the border="2" to remain.

    How do I do both, change the color and/or turn on/off border in vb.net codebehind ??

    icm63
  • Re: How do I do this in codebehind (vb.net)??

    11-01-2009, 3:20 PM
    Answer
    • Member
      638 point Member
    • losssoc
    • Member since 04-24-2008, 9:53 AM
    • Posts 212

    On page load event:


    tabShowComments.BorderColor = System.Drawing.Color.White
    tabShowComments.BorderStyle = BorderStyle.None

    You must Import System.Drawing.


  • Re: How do I do this in codebehind (vb.net)??

    11-01-2009, 3:22 PM
    Answer
    • Contributor
      3,352 point Contributor
    • Danish Ali
    • Member since 08-08-2008, 7:22 PM
    • Fort Lauderdale, US
    • Posts 467

    you can change the border color using following code.


    tabShowComments.Style.Add("border-color", "white");


    if you want to turn off the border. u can do as following


    tabShowComments.Style.Add("border", "none");

    If my post solves your problem, please mark it as an answer.
Page 1 of 1 (3 items)