I'm new to Umbraco and I'm working on adding my first .NET User Control (VB.NET/VS2008) to Umbraco 4.5.2
I've built the user control and moved the DLL to the umbraco bin folder and the control files to the umbraco user control folders.
I can see the control under the Macros node in the Developer section of Umbraco.
I can create a macro out of my control via the developer section.
I've checked "Use in editor" and "Render content in Editor"
When I browse properties I see my two properties and am able to add them as parameters for the macro.
I have a content page with a rich text editor. I click on insert macro. I choose my macro and am prompted for the values of my two parameters. I then save and publish the page.
Here's where the problem starts ....
I open the page up and I can see some of my control working but it's throwing an error because nothing is being passed to it through either parameter. If I hard code the values for the parameters inside the user control code everything works fine.
Below is my user control code. Does anyone see what I'm doing wrong? Is there something else I need to configure in Umbraco? Thanks for any help!
Imports
System.Xml
Imports
System.ServiceModel.Syndication
Partial
PublicClass RPC_RSS_Parser
Inherits System.Web.UI.UserControl
Private m_sURL AsString = ""
Private m_sNavigationType AsString = ""
Private m_sError AsString = ""
PublicProperty RssURL() AsString
Get
Return m_sURL
EndGet
Set(ByVal value AsString)
Me.m_sURL = RssURL
EndSet
EndProperty
PublicProperty NavigationType() AsString
Get
Return m_sNavigationType
EndGet
Set(ByVal value AsString)
Me.m_sNavigationType = NavigationType
EndSet
EndProperty
PublicReadOnlyProperty SlideError() AsString
Get
Return m_sError
EndGet
EndProperty
ProtectedSub Page_Load(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMe.Load
Try
'Go out and get the feed
'Cat Rental Equipment
'used for debugging only
Me.LiteralDebug.Text = "The URL passed in is: " & Me.m_sURL.ToString & " : the nav type was set to: " & Me.m_sNavigationType.ToString
Parameters not being passed to .NET User Control
I'm new to Umbraco and I'm working on adding my first .NET User Control (VB.NET/VS2008) to Umbraco 4.5.2
Here's where the problem starts ....
I open the page up and I can see some of my control working but it's throwing an error because nothing is being passed to it through either parameter. If I hard code the values for the parameters inside the user control code everything works fine.
Below is my user control code. Does anyone see what I'm doing wrong? Is there something else I need to configure in Umbraco? Thanks for any help!
Here's the page html
Hello,
should be:
Same for the other property.
It's one of those things u can spend hours debugging on. :-)
I'm a total idiot! Can't believe I missed that. Thanks for the fresh pair of eyes!
is working on a reply...