Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Building Controls / June 2006

Tip: Looking for answers? Try searching our database.

Composite Control Design View

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tim_cavins@hotmail.com - 06 Jun 2006 21:34 GMT
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
tim_cavins@hotmail.com - 07 Jun 2006 15:05 GMT
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?

> I have a composite control with multiple text boxes and drop downs
> written in VB.net and Visual Studio 2003.
[quoted text clipped - 38 lines]
>
> Tim

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.