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 / March 2005

Tip: Looking for answers? Try searching our database.

High-level question about ASP.NET web controls..

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RCS - 23 Mar 2005 17:21 GMT
I'm a bit of a noob when it comes to web controls... What I want to do, is
create web control that appears in the toolbox, that one could drag onto a
web page - and you'd see the actual control (e.g. what it will look like on
the resultant web page - much like how the datagrid looks).

If I use a "user control", it puts that grey box describing the control, and
you need to imagine what it will look like (yipee!)!

If I create a seperate "web control" project, and it creates the default
"WebCustomControl1.cs" - that adds to the toolbox, but just displays text.
And after scouring the net, looks like you'd need to manually create your
controls in text, which doesn't sound right.

Shouldn't I be able to WYSIWYG a control (and add my code behind it) and
make that available via the toolbox? The main thing I want is to see it in
design-time, and be able to manipulate the public properties...

What am I missing? Thanks!
Mythran - 23 Mar 2005 17:34 GMT
> I'm a bit of a noob when it comes to web controls... What I want to do, is
> create web control that appears in the toolbox, that one could drag onto a
[quoted text clipped - 16 lines]
>
> What am I missing? Thanks!

Sounds like 1.) You need to implement the "text" as html in the web control
and you also may need to look into Designers for your web control.  Try the
samples that come with the .Net SDK and the MSDN Library for more
information about how to do both :)

Mythran
RCS - 23 Mar 2005 17:53 GMT
Thanks for the response...

But what I'm not "getting" - is that the whole point of writing a control,
is it likely needs to do something a bit complicated or complex. So if there
were EVER a time, there should be a visual editor for laying something out,
it would be THAT!! :-)

I've been through the samples and MSDN and haven't found any reference to a
designer for a web control - do you have a link perhaps?? Thanks again!

>> I'm a bit of a noob when it comes to web controls... What I want to do,
>> is
[quoted text clipped - 27 lines]
>
> Mythran
Mythran - 23 Mar 2005 19:31 GMT
> Thanks for the response...
>
[quoted text clipped - 5 lines]
> I've been through the samples and MSDN and haven't found any reference to
> a designer for a web control - do you have a link perhaps?? Thanks again!

RCS,

Ok, then...in the MSDN Library, look up ControlDesigner class
(System.Web.UI.Design) [under Index in MSDN].  Also, for some examples,
check out the following MSDN link (in the MSDN library):

ms-help://MS.MSDNQTR.2003FEB.1033/cpguide/html/cpconhtmldesignersample.htm

and found on goolge:

http://aspalliance.com/articleViewer.aspx?aId=436&pId=-1

The above samples are extremely simple controls/designers.  Control
designers used with Web Controls can create powerful web control design-time
support for your web controls.

For more design-time support, check out TypeConverter and UI Type Editors.

Hope this helps ;)

Mythran
RCS - 23 Mar 2005 20:55 GMT
This has been a pretty frustrating day - I can't believe this, is this
difficult. But thanks again for your help!!

>> Thanks for the response...
>>
[quoted text clipped - 27 lines]
>
> Mythran
Brock Allen - 23 Mar 2005 17:50 GMT
User Controls allow you to use the designer to build them and they're typically
only used within a single project. There is no toolbox support for them.

Custom and Composite controls are packaged as DLLs and as you've seen have
no designer support, as they create all of their child controls in code.
They are built as a DLLs to deter modifications to the code/layout and this
is what a third party control dev would build. These do have toolbox support/integration
for that purpose -- these are meant for reuase across different applications.

-Brock
DevelopMentor
http://staff.develop.com/ballen

> I'm a bit of a noob when it comes to web controls... What I want to
> do, is create web control that appears in the toolbox, that one could
[quoted text clipped - 16 lines]
>
> What am I missing? Thanks!
Steve C. Orr [MVP, MCSD] - 23 Mar 2005 21:47 GMT
I don't blame you for being somewhat confused.  Control creation is a deep
topic.
I have a lot of information about the creation of web controls on my web
site.  I think you could learn some things there.

Signature

I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

> I'm a bit of a noob when it comes to web controls... What I want to do, is
> create web control that appears in the toolbox, that one could drag onto a
[quoted text clipped - 16 lines]
>
> What am I missing? Thanks!
RCS - 23 Mar 2005 23:18 GMT
Thanks - I'll check it out!

>I don't blame you for being somewhat confused.  Control creation is a deep
>topic.
[quoted text clipped - 25 lines]
>>
>> What am I missing? Thanks!

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.