I am able to add user control in Master page template but I want that User control on inner page so please tell me how to add user control on content page ,
so that I can use my user control on a page as a submit form
You should be able to map your user control to a macro, which can then be inserted into your master template.
So place your usercontrol in the "unsercontrol" folder on the disk.
In Umbraco go to the "Developer" section and right click on "macroes". Give your macro a name and click the "ok" button. Now you can map your macro to the usercontrol from the usercontrol folder.
In your master template you can now place your user control.
If you need to just add it on one particular page then you need to add it using either some logic in your user control to make a check on the page id to make sure it's placed on a certain page with that id.
Or you could just make it possible to insert the macro in the rich text editor, which gives the editors the opportunity to define where this element should be used.
If you go to "Developer" and find your macro you can mark the "Use in Rich text editor" to true. That should do the trick.
Well you can't add a .aspx page from Umbraco. But you can add a .aspx file in the root of the Umbraco folder or in a subfolder on the disk.
You will then need to update the "umbracoReservedUrls" key in the web.config with the path to your .aspx file and then you should be able to access it in the browser by going to your site like http://site.com/mycustomaspxpage.aspx
Not able to add user Control
Hi All,
I am able to add user control in Master page template but I want that User control on inner page so please tell me how to add user control on content page ,
so that I can use my user control on a page as a submit form
Thanks in advance.
Regard's
Manjeet
Hi Manjeet
You should be able to map your user control to a macro, which can then be inserted into your master template.
So place your usercontrol in the "unsercontrol" folder on the disk.
In Umbraco go to the "Developer" section and right click on "macroes". Give your macro a name and click the "ok" button. Now you can map your macro to the usercontrol from the usercontrol folder.
In your master template you can now place your user control.
I hope this makes sense.
/Jan
Hi jan,
Thanks for your valuable suggestion.
Actually I am able to do this but now I want my user Control on Inner page which is coming form Contents.
I want to show user control only on Single page but If I place this on Master page then It will appear on every page.
Please solve my this problem.
Thanks
Manjeet
Hi Manjeet
If you need to just add it on one particular page then you need to add it using either some logic in your user control to make a check on the page id to make sure it's placed on a certain page with that id.
Or you could just make it possible to insert the macro in the rich text editor, which gives the editors the opportunity to define where this element should be used.
If you go to "Developer" and find your macro you can mark the "Use in Rich text editor" to true. That should do the trick.
Hope this helps.
/Jan
Thanks Jan,
I hope it will work ,
Would you please tell me How I can Add my own aspx page in umbraco.
Actually when I added .aspx page then It never show on browser and always appear independently.
Please suggest me How I can add a page.
Regard's
Manjeet
Hi Manjeet
Well you can't add a .aspx page from Umbraco. But you can add a .aspx file in the root of the Umbraco folder or in a subfolder on the disk.
You will then need to update the "umbracoReservedUrls" key in the web.config with the path to your .aspx file and then you should be able to access it in the browser by going to your site like http://site.com/mycustomaspxpage.aspx
Hope this makes sense.
/Jan
HI jan,
Thanks for this valuable reply ,
Yes I am able to add a new .aspx form uin root folder of umbraco.
but please tell me the steps to add .aspx form in web.config file, so that I can use it in browser.
If I am able to do this my project requirment will be fulfill.
Actually I want to access that page by a link .
Kind Regard's
Manjeet
HI jan
I added .aspx page in web.config file like this
But not able to access the page on browser.
Regard's
Manjeet
HI Jan,
Thanks for your suggestion, Iam able to view the page in browser,
I need your favour once again,
Please tell me that can we add server side event in umbraco .aspx page.
Regard's
Manjeet
is working on a reply...