"Custom" Attributes Added To A Control RRS feed

  • Question

  • User-2044710053 posted

    I need to know the answer to this.  I have a standard asp control (CheckBox) and I want to bind some data to it.  I also want to be able to access it via vb in an easy manner.  Can someone tell me quickly if this is possible?  An example of what I want to do is below: 

    <asp:CheckBox ID="TestCheckBox" runat="server" MyAttribute="12345" />


    Dim myValue = TestCheckBox.Attributes("MyAttribute")


    Thursday, November 12, 2009 5:06 PM


  • User1681920274 posted

    That works fine, exactly as you have it written.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, November 12, 2009 7:29 PM