HighTechTalks DotNet Forums  

Composite Control Design View

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss Composite Control Design View in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Composite Control Design View - 06-06-2006 , 04:34 PM






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


Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: Composite Control Design View - 06-07-2006 , 10:05 AM






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?



tim_cavins (AT) hotmail (DOT) com wrote:
Quote:
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


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.