Category "razor"

How to pass model value IFormFile from view to controller On Change event

$(".uploadFile").on('change', function () { console.log('new file uploaded') //var array = $("#productImage").getIdArray(); var file

Component attributes do not support complex content (mixed C# and markup)

I am trying to use a Razor argument and pass it into Blazor for further processing, but I get this error message "Component attributes do not support complex co

How to use Bootstrap modal in Blazor client app?

I am trying to show bootstrap modal then bind its buttons. But I cannot pass the first step showing the modal. I am using Blazor client template of .net core 3.

Form within a foreach loop not posting the model back to the controller

I've searched around and can't find an answer to my problem. I've got a View that takes accepts Foo in like so: @model IEnumerable<MyApplication.Models.Foo

How to render MVC child Action PartialView into Layout @RenderSection()?

In the layout, MVC child actions are called in . However, the the partialView results are not shown in the RenderSection("userProfile", required:false). The Wa

Select items in multiselect dropdown list MVC3 jquery

How can i set values in a multiselect dropdownlist using jquery.I am using MVC3 Razor view to display the multiselect dropdown and using http://quasipartikel.a

Using Razor within JavaScript

Is it possible or is there a workaround to use Razor syntax within JavaScript that is in a view (cshtml)? I am trying to add markers to a Google map... For exa

mvc 4 Model is null

i'm using razor's listboxfor for the first time, but my Model is always null. after reading similar posts and tryouts it still won't work. Person.cshtml @mode