Composite Control Design View

T

tim_cavins

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
 
T

tim_cavins

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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top