0

I have an existing web project in Visual Studio 2012 and it is MVC4. I have Infragistics installed (all components) on the machine.

Now what I want to achieve is to be able to use the web drop down control via a HTML helper.

After some reading on here I understand there may be a few steps involved in order to be able to use the HTML helper as I wish, such as adding the namespace either to the web.config or the view.

I have tried to manually add references to the libraries but after, when trying to add the namespace to my view, it is not recognised. Assuming that there are DLL dependencies I am not aware of I used the Infragistics "Create ASP.NET Toolbox Tab for CLR 4.0 2013.1" app to hopefully add my controls for me so that a drag drop onto my html page would hopefully add whatever reference is required. The app seems to complete successfully but I don't see any change to what I need. No new items in the toolbox and still I cannot add the namespace to my view.

Can someone please tell me simply as possible how to get started? I cannot believe how difficult I have found this. I don't mind what technique, I just need a technique.

Thanks

Shumii
  • 4,529
  • 5
  • 32
  • 41

2 Answers2

1

Not a complete answer but one reason why I could not use it was because adding a reference is not enough. You need to set CopyLocal=true in order for the HtmlHelpers to pick it up.

Shumii
  • 4,529
  • 5
  • 32
  • 41
  • This is the correct answer. I added a reference to the project and added the namespace to the view as well but I was not able to use the helper until I set CopyLocal = true and did a rebuild on the project. – Mike McCoy Jan 23 '14 at 15:15
1

Use the jQuery combo box rather than the ASP.NET WebDropDown as the WebDropDown is dependent on the page and ASP.NET web forms which you are not using in ASP.NET MVC. You can either write your own helper or use the one that Infragistics provides.

alhalama
  • 3,218
  • 1
  • 15
  • 21