Hello, I am using .Net control first time in umbraco. In that user control, I have one form which will add that all information under the one of node under 'Content' node.
Now my query is, how much part I have to complete in user control before adding to umbraco project? Or should add only blank user control then set property after adding to umbraco project?
Help me for how to prepare this kind of user control?
Hi Alex, In code till now I have written only code which is getting values. till that working fine and till now I haven't add .ascx file to my Umbraco project.
My query is,
1) Should I add code which will add information to node under 'Content' node? Or after adding that simple coded .acsx file to project, I should write code which will add info to content node?
2) I have tried with simple user control in demo project, but when I copy only .ascx file to 'usercontrol' folder, Its copying .ascx.cs file also and it is pointing to that project from which I have copied that control. For that where am I doing mistake?
I have added dll and .ascx file to my umbraco project. Its showing form proper. But now issue is on click of 'Send Request' button it is not displaying expected output. And URL become like this :
Looks like you try to use webForms usercontrol in MVC project.
You have to decide which render engine to use.
If you want to use .net usercontrol you have to look at Master.master, there should be
after tag.
Changing Rendering Engine
You can change the engine on umbracoSettings.config. It is located on /Config/ folder
<templates>
<!-- To switch the default rendering engine to MVC, change this value from WebForms to Mvc -->
<defaultRenderingEngine>Mvc</defaultRenderingEngine>
</templates>
User control : add info to content node
Hello, I am using .Net control first time in umbraco. In that user control, I have one form which will add that all information under the one of node under 'Content' node.
Now my query is, how much part I have to complete in user control before adding to umbraco project? Or should add only blank user control then set property after adding to umbraco project?
Help me for how to prepare this kind of user control?
Thanks, Dipa
Hi Dipa,
Can you show your code?
Hi Alex, In code till now I have written only code which is getting values. till that working fine and till now I haven't add .ascx file to my Umbraco project.
My query is, 1) Should I add code which will add information to node under 'Content' node? Or after adding that simple coded .acsx file to project, I should write code which will add info to content node?
2) I have tried with simple user control in demo project, but when I copy only .ascx file to 'usercontrol' folder, Its copying .ascx.cs file also and it is pointing to that project from which I have copied that control. For that where am I doing mistake?
Guide me for these two queries.
Thanks, Dipa
Hi Alex,
Here is the code of my user control.
1) .ascx.cs file
2) .ascx file
I have added dll and .ascx file to my umbraco project. Its showing form proper. But now issue is on click of 'Send Request' button it is not displaying expected output. And URL become like this :
Not getting what is the issue. Please help me.
Hi Dipa,
What Umbraco version are you using?
Looks like you try to use webForms usercontrol in MVC project.
You have to decide which render engine to use.
If you want to use .net usercontrol you have to look at Master.master, there should be
after tag.Changing Rendering Engine
You can change the engine on umbracoSettings.config. It is located on /Config/ folder
Cheers,
Alex
Hi Alex,
Here is detail about versions :
And in defaultRenderingEngine I have mentioned WebForms keyword. Though it is not working.
Any thing else am I missing?
Check, please,
Hi, there is no anything like 'Master.master' in entire solution.
Can you please elaborate it?
Dipa, I meant Master of your page. What template are you using? Try to check "masterpages" folder.
/Alex
In masterpages folder, there are three files
1) default.Master 2) umbracoDialog.Master 3) umbracoPage.Master
If I am interpreting anything wrong, please guide me.
Can you define which of these templetes are using on your page ?
You can look at Umbraco node, Properties tab.
Screen example:
http://screencast.com/t/RtRqJWQm0
As master page I have created one own master page, which is actually a .cshtml file.
and here master page is :
Dipa, it what I said on top - this is not WebForms template - this is Razor, you need to use WebForms template with usercontrols.
Change your template please.
Okey, Got it.
Thanx Alex
You are welcome, write if something.
Cheers
Dipa, can you mark the topic as solved? It's much easier for other people to find a solution.
Thanks
is working on a reply...