I created a new ASP.NET Core with controllers and views in Visual Studio 2019.
I am trying to get a currency editor control to work but no luck. I've copied the code from the page designer into my razor view but it does not display correctly.
I don't know what goes in the layout file vs the view. Any help on how to get the basics working is greatly appreciated.
Hi, I found the problem. As soon as I added the controls, I got the error message again. The message said I needed to add a reference to System.Web.Mvc assembly. This assembly doesn't appear in the list when you try to add a reference using the reference dialog. This is where I had been stuck.
I found a solution online. I added the package micrsoft.aspnet.mvc. That cleared the error messages up and everything is now working.
I don't know why I needed to add this package. The only thing I can think is that I was using VS2019 community version. Maybe it doesn't provide the same template as the full VS2019.
Hi,
Since the sample I have provided works on your side, what I can suggest is to start gradually adding the code from your project to it, until the issue is reproduced. You can then attach the sample here so I can investigate the issue further.
Looking forward to hearing from you.
I just downloaded the sample and tested it. It is working!
Thank you, but unfortunately, I don't understand why it is not working in my application.
Can you provide guidance on where to check for problems? Do you have an approach for debugging that I could follow?
Hello David,
I have created and attached a sample project based on the template you have specified using VS2019.
Please test it on your side and let me know how it behaves.
If this is not an accurate demonstration of what you are trying to achieve, please feel free to modify it and send it back to me for further investigation.
5086.Sample.zip
I do have the sample working now. However, I am not able to get Ifragistics working in a new MVC Core project.
The new project was created in VS2019 using the template:
MVC Core with Controllers and Views
When I copy the sample code into the new project, I get the same error message:
Error CS1061 'IHtmlHelper<dynamic>' does not contain a definition for 'Infragistics' and no accessible extension method 'Infragistics' accepting a first argument of type 'IHtmlHelper<dynamic>' could be found (are you missing a using directive or an assembly reference?) IgniteUI C:\Users\Dave\OneDrive\IgniteUI\IgniteUI\Views\Home\Privacy.cshtml
All of the control definitions such as this one
<div class="group-fields"> <label for="lastName">Last Name</label> @(Html.Infragistics().TextEditor() .ID("lastName") .InputName("lastName") .PlaceHolder("Anderson") .Render() )
</div>
Throw a compile error.
I have copied the sample code into an empty view named Privacy.cshtml
The new project structure is very different than the MVC sample that you provided.
What can I check or add to the project? Thanks for your help.