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.
Hello David,
Thank you for contacting Infragistics. Did you try calling Render, as explained in our documentation?
No
Severity Code Description Project File Line Suppression State 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 2 Active
I have not seen this before, did you mean you didn't try using the Render? If not, it is required. Try running this sample, and use it as a baseline.
https://filetransfer.infragistics.com/public.php?service=files&t=ce99fa613b6a76913267e8af6500e3fd
I sent a reply just now but you may not have received it. I need to try one more thing to see if I can get the sample to compile.
Hi, thank you. This sample is working now. I have a few questions.
This sample application has a folder structure much different than what I am used to. There is no webroot folder that is present when you create a web MVC project in visual studio 2019.
1 Does the folder structure need to match this sample in order for it to work?
2. Do the CSS files need to be in a Scripts folder in order to work?
I am unclear on how link references and script references work. Still learning this aspect of MVC development.
There is no Views\Shared folder and no _Layout.CSHTML file in the Shared folder.
3. Do the links and scripts reference in the view need to be in the view or can they be in the _Layout.cshtml file?
One thing that should be updated/noted in your documentation is that the Visual Studio 2019 Community edition does not align with Microsoft documentation and there is no way to add references.
4. I see many references in this project that are not in mine. When I tried to add these references, they did not show up in the list. Do you know if this is another shortcoming of the
Thanks for your help.
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.
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.
Looking forward to hearing from you.
5086.Sample.zip