I Need to connect my webservice into my umbraco website , so i found the technique adding web form .ascx user controls in umbraco 6.1.6 . but in umbraco 7.2.4 using razor engine , my user control only displayed but buttons not working. i cant creat a user contol with razor script and cant add a razor script page.
How to use web form usercontrol in razor view
I Need to connect my webservice into my umbraco website , so i found the technique adding web form .ascx user controls in umbraco 6.1.6 . but in umbraco 7.2.4 using razor engine , my user control only displayed but buttons not working. i cant creat a user contol with razor script and cant add a razor script page.
Hi Ram,
For Umbraco 7.2.4 you need to convert that UserControl into partial view.
Otherwise you need to change your DefaultRenderEngine to WebForms.
Then you will be able to use UserControl.
I think the best way is to convert your usercontrol into partial view.
Hope it will help.
Regards,
Urvish Mandaliya
hi Urvish,
thanks you very much. it's great.
that is fine, now my user control works.
if i create a view in visual studio means, how to get it in umbraco.
i tried to create a view and partial view in visual studio project of umbraco nuget installed.
after running it i cant see the view page in umbraco developer(macro) section.
please give me a solution.
Actually i need to connect my webservice with umbraco application.
the user entries will send to MSSQL Data Base.
please provide any useful tips.
Hi Ram,
If you want to see the partial view in macro,
then you need to create view in Partial View Macro Files folder from the Developer section in Umbraco.
Or else you can also create your view on this path.
Hope it helps.
Regards,
Urvish Mandaliya
Hi Urvish,
I can create a view in developer section,
but how can use the controller and model from my visual studio
to developer section view.cshtml file
Hi Ram,
You need to create macro file of that view in developer section.
Then you can call macro in view.cshtml like below.
You can also call that macro in controller like below.
You need to pass Alias and other thing s you want in that macro object. Frankly speaking I haven't used this way of rendering macro from controller.
Hope this will help.
Regards,
Urvish Mandaliya
is working on a reply...