6

I am creating DD4T.net page using Smart Target as per details mentioned in Help Link there is one method in view is called @Html.RenderSmartTargetRegion("HomepagePromotions") which is not available when I am trying to call I believe some DLL is missing.

Any Help regarding the same will be highly appreciated

2
  • can you edit your question and supply a bit more detail on what error you are getting? Commented Feb 4, 2015 at 11:08
  • @Html.RenderSmartTargetRegion("HomepagePromotions") method is not available and there is no error just method is missing.
    – Hem Kant
    Commented Feb 4, 2015 at 11:17

1 Answer 1

4

This function is not a standard functionality that is available in the dd4t dlls, that's why it doesn't work with your setup.

The blog post you refer to describes how you can add such functionality. Basically, you should copy/paste the helper code (class : SmartTargetHelper) in your own project, build it, and then calling the function RenderSmartTargetRegion should work.

4
  • I did exactly the same copy the class from the blog post in my .net application but the method is not available
    – Hem Kant
    Commented Feb 4, 2015 at 11:15
  • Also there is not such function exist in that class
    – Hem Kant
    Commented Feb 4, 2015 at 11:23
  • The function you describe is a c# extension method. Are you sure you added the function in a static class. Also, do you import that namespace in your razor view (@using "namespace" in top of your view ?) Commented Feb 4, 2015 at 12:15
  • Yes but RenderSmartTargetRegion is not available
    – Hem Kant
    Commented Feb 4, 2015 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.