Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Dear all
Im sorry if i put this question in the wrong place because i don't know where can i put this question.
I want to use the .net user control in my macro ( instead of using the xslt file)
I read an article :http://our.umbraco.org/forum/developers/api-questions/5797-Contact-Form
and after that i do the following:
+ I write a user control (using the visual studio ) . get the binay (.dll files ) as well as the .ascx file.
+Put the *.dll in bin folder into the bin folder of the installed umbraco.
+Put the .ascx file into the usercontrols folder of the isntalled umbraco
Create a macro and browser to the ascx file
Use the macro in the master page
<umbraco:Macro ID="Macro5" Alias=" My.TestMacro" runat="server"></umbraco:Macro>
But there is nothing occur.
Please help me.
Thank you for your patience.
Hi thantien,
Sounds weird!
Is the alias value well written?
Are you using a Web Deplyment project?
Could you post the ascx code?
I need more information...
Sincere regards,Eduardo
hi karma
I use build--> public website (visual studio 2008 because i use umbraco 4.6.0 alpha) --> copy the *.dll in bin folder and the .ascx file
My user control is very simple:
the is only 1 button (named button1 )and 1 label ( named label1)
the code
public partial class BIDCContactForm : System.Web.UI.UserControl{ protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { Label1.Text = "Hello you"; }}
Maybe the macro Alias is misspelled.
<umbraco:Macro ID="Macro5" Alias=" My.TestMacro" runat="server">umbraco:Macro>
Use another Alias name like 'MyTestMacro':
<umbraco:Macro ID="Macro5" Alias="MyTestMacro" runat="server">umbraco:Macro>
Also, take a look at the WIndows Event Viewer.
HTH
Regards,Eduardo
Hi,
Goto your page and use the the querystring ?umbdebugshowtrace=true
This will show the complete stack trace including information what is wrong.
Cheers,
Richard
Hi , I change the alias of the macro and after that it works. look strange,
thank all of you so much
Hi than,
You are welcome.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
create a macro using the .NET user control
Dear all
Im sorry if i put this question in the wrong place because i don't know where can i put this question.
I want to use the .net user control in my macro ( instead of using the xslt file)
I read an article :http://our.umbraco.org/forum/developers/api-questions/5797-Contact-Form
and after that i do the following:
+ I write a user control (using the visual studio ) . get the binay (.dll files ) as well as the .ascx file.
+Put the *.dll in bin folder into the bin folder of the installed umbraco.
+Put the .ascx file into the usercontrols folder of the isntalled umbraco
Create a macro and browser to the ascx file
Use the macro in the master page
But there is nothing occur.
Please help me.
Thank you for your patience.
Hi thantien,
Sounds weird!
Is the alias value well written?
Are you using a Web Deplyment project?
Could you post the ascx code?
I need more information...
Sincere regards,
Eduardo
hi karma
I use build--> public website (visual studio 2008 because i use umbraco 4.6.0 alpha) --> copy the *.dll in bin folder and the .ascx file
My user control is very simple:
the is only 1 button (named button1 )and 1 label ( named label1)
the code
Hi thantien,
Maybe the macro Alias is misspelled.
Use another Alias name like 'MyTestMacro':
Also, take a look at the WIndows Event Viewer.
HTH
Regards,
Eduardo
Hi,
Goto your page and use the the querystring ?umbdebugshowtrace=true
This will show the complete stack trace including information what is wrong.
Cheers,
Richard
Hi , I change the alias of the macro and after that it works. look strange,
thank all of you so much
Hi than,
You are welcome.
Sincere regards,
Eduardo
is working on a reply...