Problems with UserControl Macro Options
t0nyhtp
Posted: Thursday, December 13, 2007 11:15:59 AM
Rank: Enthusiast

Joined: 11/27/2007
Posts: 10
I've created a user control in c# based on an Umbraco example template. It's a form post control and I've tested it outside umbraco (as an ASPX file).
But when I include it as an usercontrol in Umbraco I get the following error:

[quote]Error creating control (/usercontrols/my_usercontrol.ascx).
Maybe file doesn't exists or the usercontrol has a cache directive, which is not allowed! See the tracestack for more information![quote=]

Any ideas what this means?

How do I solve this?

Thanks in advance!
Regards, Tony H
kalpa
Posted: Thursday, December 13, 2007 8:38:20 PM

Rank: Fanatic

Joined: 7/19/2006
Posts: 395
Location: Göteborg, Sweden
That might be caused an error in the file, does the ascx-file contain any forms?

anyway add ?umbdebugshowtrace=true to the path of your page and see if the trace shows any additional info...

// ;) Kalle

" - Yeah I'd like to share your point of view, as long as it's my view too... (http://www.d-a-d.dk/lyrics/pointofview)
t0nyhtp
Posted: Friday, December 14, 2007 11:17:10 AM
Rank: Enthusiast

Joined: 11/27/2007
Posts: 10
Thanks I found the error. It was caused by a minor error in my usercontrol file. I found it when I used my control on a regular ASPX page to debug it.

For any one with the same problem - ignore the error you se on you umbraco page including the usercontrol - it's a standard error message. Instead debug the control on a separate page... :)

Thanks!
kalpa
Posted: Friday, December 14, 2007 11:40:10 AM

Rank: Fanatic

Joined: 7/19/2006
Posts: 395
Location: Göteborg, Sweden
In some cases you can't debug in a stand alone file.
For instance when you depend on macro input parameters from umbraco ; )

Actually, I've build a quite complex controls based application using Umb as a GUI wrapper and the debugging information displayed via "mypage.aspx?umbdebugshowtrace=true" was very good info...

For real debugging with code stepping I'll suggest that you attach Visual Studio to your local IIS Process ( Debug >> "Attach to process..." and select "w3wp.exe" )

That way you'll get full control with breakpoints etc and a real test of you controls functionality inside umbraco...

// ; ) Kalle

" - Yeah I'd like to share your point of view, as long as it's my view too... (http://www.d-a-d.dk/lyrics/pointofview)
kalpa
Posted: Friday, December 14, 2007 11:43:12 AM

Rank: Fanatic

Joined: 7/19/2006
Posts: 395
Location: Göteborg, Sweden
Just remembered this old one from me:
http://forum.umbraco.org/extending-umbraco/debugging-user-controls-howto">http://
http://forum.umbraco.org/extending-umbraco/debugging-user-controls-howto

" - Yeah I'd like to share your point of view, as long as it's my view too... (http://www.d-a-d.dk/lyrics/pointofview)
kalpa
Posted: Friday, December 14, 2007 11:44:13 AM

Rank: Fanatic

Joined: 7/19/2006
Posts: 395
Location: Göteborg, Sweden
kalpa
Posted: Friday, December 14, 2007 11:45:05 AM

Rank: Fanatic

Joined: 7/19/2006
Posts: 395
Location: Göteborg, Sweden
Aha, only links using the "URL=" button will work...

" - Yeah I'd like to share your point of view, as long as it's my view too... (http://www.d-a-d.dk/lyrics/pointofview)
t0nyhtp
Posted: Wednesday, February 27, 2008 10:37:45 AM
Rank: Enthusiast

Joined: 11/27/2007
Posts: 10
Thanks, will try it...
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.