Composite Control Design View

Discussion in 'ASP .Net Building Controls' started by tim_cavins@hotmail.com, Jun 6, 2006.

  1. Guest

    I have a composite control with multiple text boxes and drop downs
    written in VB.net and Visual Studio 2003.

    It also contains properties such as Mini and DisplayJobFunction which
    are booleans.

    I am having two issues in the Design View:

    1) The composite control originally comes up as an Error in creating
    control when dragging it to Design View. If I switch to HTML View and
    then back, the control is displayed properly.

    2) I have created an XSD file for using Intellisense in the control. If
    I enter DisplayJobFunction="True" in HTML View and then switch to
    Design View, the control will not display. I have some items in my
    Render method that should be conditionally displayed depending on these
    values. The default value is False and the control displays fine if I
    don't add the attribute to my composite control tag.

    My Render method looks like this:

    Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)

    If DisplayJobFunction Then
    writer.AddAttribute("valign", "top", False)
    writer.RenderBeginTag(HtmlTextWriterTag.Tr)
    writer.RenderBeginTag(HtmlTextWriterTag.Td)
    lblPagerNumber.RenderControl(writer)
    writer.RenderEndTag() ' td
    writer.RenderBeginTag(HtmlTextWriterTag.Td)
    writer.AddAttribute("size", "25", False)
    txtPagerNumber.RenderControl(writer)
    writer.RenderEndTag() ' td
    writer.RenderEndTag() ' tr
    End If


    Can anyone tell me why the situations in #1 and #2 above are occurring?
    Can they be fixed and if so how?

    Thanks,

    Tim
    , Jun 6, 2006
    #1
    1. Advertising

  2. Guest

    Correction, if I enter DisplayJobFunction="False", the control will not
    display in design view but will run without errors.

    It seems like it only happens for properties that I have inside of the
    composite control because I tested If 1 = 2 and the control displayed
    properly in design view.

    Does anyone have any ideas on what's happening?



    wrote:
    > I have a composite control with multiple text boxes and drop downs
    > written in VB.net and Visual Studio 2003.
    >
    > It also contains properties such as Mini and DisplayJobFunction which
    > are booleans.
    >
    > I am having two issues in the Design View:
    >
    > 1) The composite control originally comes up as an Error in creating
    > control when dragging it to Design View. If I switch to HTML View and
    > then back, the control is displayed properly.
    >
    > 2) I have created an XSD file for using Intellisense in the control. If
    > I enter DisplayJobFunction="True" in HTML View and then switch to
    > Design View, the control will not display. I have some items in my
    > Render method that should be conditionally displayed depending on these
    > values. The default value is False and the control displays fine if I
    > don't add the attribute to my composite control tag.
    >
    > My Render method looks like this:
    >
    > Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)
    >
    > If DisplayJobFunction Then
    > writer.AddAttribute("valign", "top", False)
    > writer.RenderBeginTag(HtmlTextWriterTag.Tr)
    > writer.RenderBeginTag(HtmlTextWriterTag.Td)
    > lblPagerNumber.RenderControl(writer)
    > writer.RenderEndTag() ' td
    > writer.RenderBeginTag(HtmlTextWriterTag.Td)
    > writer.AddAttribute("size", "25", False)
    > txtPagerNumber.RenderControl(writer)
    > writer.RenderEndTag() ' td
    > writer.RenderEndTag() ' tr
    > End If
    >
    >
    > Can anyone tell me why the situations in #1 and #2 above are occurring?
    > Can they be fixed and if so how?
    >
    > Thanks,
    >
    > Tim
    , Jun 7, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    718
  2. sleigh
    Replies:
    1
    Views:
    2,685
    sleigh
    Feb 12, 2004
  3. Replies:
    1
    Views:
    370
    Teemu Keiski
    Jul 2, 2003
  4. Chad
    Replies:
    0
    Views:
    219
  5. Parthiv Joshi
    Replies:
    1
    Views:
    657
    Samuel L Matzen
    Jul 6, 2004
Loading...

Share This Page