|
|
Rank: Enthusiast
Joined: 12/8/2006 Posts: 11
|
Well im trying to create my first usersontrol. I've found this document http://en.wikibooks.org/wiki/Umbraco/Samples_and_Articles/Dot_Net_Controls/Using_Dot_NET_Controls_With_Umbraco but i cannot get it to work. I'm trying to create the usercontrol with MS Visuel web develover 2008 express. Is there anyone who has an easy example hot to create a usercontol ? or can someone point me to some docs ?? Best Regards Morten
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 777 Location: Leigh-on-Sea, Essex, UK
|
Hello Morten, It depends what you are trying to achieve with the usercontrol. I recommend that you download my website package, http://packages.umbraco.org/packages/website-packages/creative-web-site-package?callback=This will download a zip file. Unzip it and look at the VB.NET usercontrols I have created and this will give you some idea of what I have created. If you install my website package you will also see how I use the usercontrol by setting up a macro that calls the .ascx (usercontrol) Warren Warren Buckley an Umbraco MVP 08-09 & level 1 certified developer
|
|
Rank: Enthusiast
Joined: 12/8/2006 Posts: 11
|
Thanks. Just wanted to make a simple usercontrol to see how it all works. IN the future it should be used to get some external data from Oracle.
I will install your package right away.
Morten
|
|
Rank: Enthusiast
Joined: 12/8/2006 Posts: 11
|
Thanks Warren
That was what i needed. One thing though when clicking browse properties on one of your macros Umbraco dosn't show me any properties. That is the same problem i have when writing usercontrols myself.
Best Regards
Morten
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 777 Location: Leigh-on-Sea, Essex, UK
|
Hiya Morten, you will have to ask someone else in regards to that as I have never managed to do it myself. However these controls work fine without it. Warren Buckley an Umbraco MVP 08-09 & level 1 certified developer
|
|
 Rank: Administration
Joined: 7/25/2006 Posts: 415 Location: vipperoed, denmark
|
Morten wrote: Thanks Warren
That was what i needed. One thing though when clicking browse properties on one of your macros Umbraco dosn't show me any properties. That is the same problem i have when writing usercontrols myself.
Best Regards
Morten
You have to use public get/setters. Try this: public string MyText { set { _myText = value; } } where _myText is a private class variable. Kindly, Jesper webbureau jesper.com doing webdesign / development / umbraco implementations / 2007&2008 MVP
|
|
Rank: Aficionado
Joined: 7/23/2006 Posts: 172
|
In visual studio just write
prop and tab twice and you will get it right
Søren Linaa Level 1 & 2 Certified Professional
|
|
|
Guest |