asp.net-mvc-5

Kendo UI reference not working in Razor view

二次信任 提交于 2020-01-12 13:57:15
问题 I am trying to create a Telerik Grid view but when I go to reference kendo it does not recognize it. Visual Studio is giving me an error when I try to reference kendo. This is the code @(Html.Kendo().Grid) and below is the error. 'System.Web.Mvc.HtmlHelper<dynamic>' does not contain a definition for 'Kendo' and no extension method 'Kendo' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<dynamic>' could be found (are you missing a using directive or an assembly reference?) I have

Kendo UI reference not working in Razor view

人走茶凉 提交于 2020-01-12 13:56:31
问题 I am trying to create a Telerik Grid view but when I go to reference kendo it does not recognize it. Visual Studio is giving me an error when I try to reference kendo. This is the code @(Html.Kendo().Grid) and below is the error. 'System.Web.Mvc.HtmlHelper<dynamic>' does not contain a definition for 'Kendo' and no extension method 'Kendo' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<dynamic>' could be found (are you missing a using directive or an assembly reference?) I have

Strongly Typed RedirectToAction (Futures) using async Controllers

自作多情 提交于 2020-01-12 07:58:08
问题 having this code it gives me a warning : Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. public async Task<ActionResult> Details(Guid id) { var calendarEvent = await service.FindByIdAsync(id); if (calendarEvent == null) return RedirectToAction<CalendarController>(c => c.Index()); var model = new CalendarEventPresentation(calendarEvent); ViewData.Model = model; return

How to Resolve Arguments are not valid for System.ComponentModel.PropertyChangingEventHandler

梦想的初衷 提交于 2020-01-11 12:44:30
问题 I'm rewriting an ASP.NET MVC3 app in MVC5 which makes heavy use of Knockout and MVVM. The model classes are heavily laden with INotifyPropertyChanged and INotifyPropertyChanging functions. While bringing the following statements into the MVC5 app, I'm receiving the build error in the subject line above: public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if (this.PropertyChanging

Export html table into CSV file , always return empty file

China☆狼群 提交于 2020-01-11 12:14:54
问题 I am working on an asp.net mvc5 web application. and i need to implement a functionality to export an Html table into a .csv file . so i added the following link :- <a href="#" class="export">Export Table data into Excel</a > and i have the following script:- $(document).ready(function () { function exportTableToCSV($table, filename) { var $rows = $table.find('tr:has(td)'), // Temporary delimiter characters unlikely to be typed by keyboard // This is to avoid accidentally splitting the actual

Why is IIS Express returning HTTP 500 errors loading javascript and CSS?

别来无恙 提交于 2020-01-11 10:00:10
问题 I am trying to develop an ASP.NET MVC5 solution using IIS Express for local debugging. Frequently, Chrome will report HTTP500 errors trying to load certain JS and CSS files (some using the built in bundling and minification feature of MVC, some on their own). WTH is going on with this and how do I stop it? Thanks, Matthew 回答1: What helped worked is as follows. I am using Visual Studio 2015. Close the visual studio solution. In fact I closed the visual studio itself In the solution folder(the

Using ASP.NET Identity on MVC 5 project but httpcontext User.ProviderName is “AspNetSqlRoleProvider”

情到浓时终转凉″ 提交于 2020-01-11 05:45:08
问题 I have a MVC 5 project using ASP.NET Identity (Invidual user account). As Database ORM I am using Entity framework 6 and IoC is taken care by Ninject. Solution structure is following MVC project -- has my controllers, views and ninject setup. For Ninject I got Ninject.MVC3 from nuget. Data project --- has my DataContext (IdentityDbContext) and my ApplicationUser (IdentityUser). My Data services and all repositories Core project -- has all my entities and interfaces [Authorize] attribute works

Azure infinite redirect loop in Chrome

谁说我不能喝 提交于 2020-01-10 19:59:10
问题 I have an MVC5 Azure web site which was working fine last night. Now it seems to be stuck in an infinite redirect loop when trying to login via chrome. It works fine from Edge and FireFox. It uses Azure AD for authentication. The redirects are back and forth from the main site to login.microsoftonline.com. 回答1: Sometimes, some bad tokens that AAD uses can get cached by the browser. They're used in place of the valid tokens, and not refreshed. Clearing the browser cache (Ctrl-Shift-Delete on

RDLC report MVC 5 without iframe

ぃ、小莉子 提交于 2020-01-07 07:41:11
问题 Is there any better way to integrate rdlc report on mvc 5 asp.net. everyone is showing using iframe. but i don't like that solution. Is there any elegant solution ?? 回答1: How about rendering your rdlc report in a separate tab ?! For instance,: In your controller: public ActionResult Report() { LocalReport localReport = new LocalReport(); localReport.ReportPath = Server.MapPath("~/Reports/Report1.rdlc"); // you may comment dbContext if the report is static or needs no DB-connection using

Iframe not showing website in Asp .Net MVC5

江枫思渺然 提交于 2020-01-07 05:25:29
问题 Hi I am developing website using asp .net mvc5 but when I am using IFrame it is not showing any results. After googling and reading some documents I have found that MVC5 stops Iframe by default. I have found some answers on stackoverflow and other blogs but nothing works for me. Please check where I am doing mistake: Here is my Code: public ActionResult Index() { return View(); } My View: <iframe width="482" height="500" scrolling="no" frameborder="0" id="paymentFrame" src="http://www