Results 1 to 2 of 2

Thread: Subproperties

  1. #1

    Thread Starter
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861

    Subproperties

    I managed to create subproperties for a custom control, but I am running into one problem.

    The parent property is displaying the control.classname value instead of being blank (like the Font property).

    Below is the image.
    You'll notice next (to the right) of the Font property it is blank.
    But next to my custom property (UseRequiredValidator) it has the value (JHARequiredFieldValidator.RequiredFieldValidatorProperties).

    How can I make that blank???
    I would also like to have the last child property (UseRequiredValidator) to be the first child property listed (above ErrorMessage and ErrorText)

    Attached Images Attached Images  
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  2. #2

    Thread Starter
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    I fixed it by do this
    VB Code:
    1. Public Overrides Function toString() As String
    2.         Return ""
    3. End Function
    However, I am having a problem with the way it renders in the html.
    When setting the font property of a control it renders like this
    VB Code:
    1. <asp:TextBox id=TextBox1 runat="server" [b]Font-Bold="True"[/b]></asp:TextBox>
    but with my custom control it is rendering like this
    Code:
    <cc1:JHARequiredFieldValidator id=JHARequiredFieldValidator1 runat="server">
    <UseRequiredValidator _UseRequiredValidator="True" ErrorMessage="test">
    </UseRequiredValidator>
    </cc1:JHARequiredFieldValidator>
    The _UseRequiredValidator should be a property of the <cc1:JHARequiredFieldValidator> control, so it should render something like this
    Code:
    <cc1:JHARequiredFieldValidator id=JHARequiredFieldValidator1 runat="server" UseRequiredValidator-_UseRequiredValidator="True" UseRequiredValidator-ErrorMessage="This is the error message.">
    </cc1:JHARequiredFieldValidator>
    any ideas how to correct this?
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

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