Data dodania Pytanie
2018-01-16 22:01 Need to "extend" RazorView to accept physical path to layout »
Has anyone had any success loading _Layout.cshtml from a physical path before? Problem: At present, MVC throws an error if you attempt to pass someth...
(1) odpowiedzi
2018-01-16 21:01 Document.on("Submit") is not working as expected »
I have a simple form, where we need to enter the details and on submission, it hits the controller and return the confirmation message. My issue is,...
(1) odpowiedzi
2018-01-16 14:01 Save image in sql database with razor (ASP .net MVC, Entity Framework) »
I have a web application, where I want to save images in my database. In my Application.Web I have a folder called images. The uploaded images should ...
(3) odpowiedzi
2018-01-15 19:01 Using Ajax return data to fill a span tag »
I have this ajax call that is called when data is successfully update: function success(data) { var userId = $('#ID').val(); $.ajax({ url: "/Orde...
(2) odpowiedzi
2018-01-15 10:01 Tag helpers in ASP.NET »
I am learning ASP.NET Core with this tutorial. I am now adding search funcionality, which requires passing data between Razor Page and underlying C# ...
(1) odpowiedzi
2018-01-15 03:01 How to convert a C# sorted dictionary to a related javascript key Value pair array »
I have a sorted Dictionary.When selecting an option from the dropdown, I want to get the id of the selected element(these option ids are also the keys...
(1) odpowiedzi
2018-01-14 21:01 Asp.net MVC not finding extension method, despite putting in Web.config »
I created a String extension method. It is under the namespace MyApp. It worked in all C# classes, but won't work in MVC Razor views. I tried adding ...
(0) odpowiedzi
2018-01-14 20:01 mvc5 post custom List Object to Controller from View »
I am currently attempting to post a list of a custom object to the controller. I am able to successfully display this data from the controller to the...
(0) odpowiedzi
2018-01-14 15:01 Visual Studio 2017 adding unwanted dll's after publishing »
I have a web application built using .NET Framework 4.5.1 When i publish it from VS2017, VS2017 adds unwanted dll's, not listed in the references, wh...
(1) odpowiedzi
2018-01-13 19:01 Razor compilation fails on TestHost when rendering view xUnit tests »
I following steps in the suggested workarounds here, here and and here I added: <PreserveCompilationContext>true</PreserveCompilationContex...
(1) odpowiedzi
2018-01-13 14:01 Update div class in foreach loop using partial »
I want create a blogs list with mvc razor. I have a partial for calling blogs item and a layout as master page. I want using zip layout (first item pu...
(1) odpowiedzi
2018-01-13 00:01 Rendering Quotation Marks in a @Html.Raw() Syntax »
Trying to render this syntax in a Partial View: @Html.Raw("<table class="table table-togglable table-hover default footable-loaded footable">...
(2) odpowiedzi
2018-01-12 21:01 C# Razor View Error - Braces Expected »
Apologies, if this is very easy for some of you (if not everyone). I am a newbie in Razor view, so your help and support is highly appreciated. I am...
(2) odpowiedzi
2018-01-12 20:01 ASP.Net MVC Razor Document Downloading as Corrupt »
I'm working on an ASP.Net project that is based off of Razor. We are posting documents from the client side using formdata and need to change the name...
(0) odpowiedzi
2018-01-12 08:01 Redirect to Action is not working With ASP.NET core »
I have my login view which wants to redirect to Clients page after successful login. To do that I am using , [HttpPost] public async Task&...
(1) odpowiedzi
2018-01-11 17:01 Razor Html.BeginForm Submit button works in every browser except chrome »
I've been searching and found various answers but so far none seem to hit on my issue here. Seen things not working in other browsers but not yet chro...
(1) odpowiedzi
2018-01-11 11:01 Why does MVC use the Modelstate over a supplied Model on a GET »
When MVC runs an ActionMethod it will populate the ModelState dictionary and uses a ModelBinder to build the ActionMethod parameter(s) if any. It does...
(1) odpowiedzi
2018-01-11 07:01 Pass HTML hidden field value in @HTML.BeginForm »
I want to pass a hidden field value on click of submit button into my action method. This needs to happen on click of a button which posts a file. Bel...
(1) odpowiedzi
2018-01-11 04:01 Razor and Antiforgery »
I recently came accros the following note on the Microsoft doc (https://docs.microsoft.com/en-us/aspnet/core/security/anti-request-forgery): Razor...
(1) odpowiedzi
2018-01-10 13:01 How to write razor query to display two fields side by side? »
I am dynamically generating the fields using a foreach loop. I have several conditions on rendering those fields. There is one condition where on it b...
(2) odpowiedzi
2018-01-10 07:01 Missing some of web development utilities in VS2017 »
I asked question yesterday, which wasn't answered. I gathered some more details and now I am able to ask more specifically: Generally, I have to PCs:...
(1) odpowiedzi
2018-01-10 03:01 Using “razor” outside of ASPNET Core 2.0 »
Has anyone ever managed to run RAZOR out of aspnet core 2.0? I would like to use it in place of T4 templates that are very dependent on Visual Studio....
(1) odpowiedzi
2018-01-09 23:01 Kendo Grid Binding with Razor »
I setup a function used to save the grid's state along with its options to a database whenever something is modified. Every user will have their own r...
(0) odpowiedzi
2018-01-09 15:01 Umbraco Truncate »
Umbraco Truncate doesn't seem the work for me, it constantly errors while I'm using the right code (according to the internet). I can't figure out wha...
(1) odpowiedzi
2018-01-09 06:01 To bold "selected" text in textarea with javascript/jquery »
I have a code which bold the complete text present in textarea but i want to Bold only selected text to be bold present in text area. Note that i don'...
(0) odpowiedzi
2018-01-08 23:01 Razor pages - RouteData null on Post »
I am trying to learn MVC and Razor pages (I am new to web development) and I am having an NullReferenceException on Post because RouteData is null. I ...
(1) odpowiedzi
2018-01-08 20:01 Loop through numbered properties to generate inputs in Razor Pages »
I have a model with 34 numbered properties in it as shown below Public Class ViewModel { public string RatingCategory01 { get; set; } public ...
(2) odpowiedzi
2018-01-08 12:01 Pass parameter to c# static function in javascript »
i'm working in a java script function which bind html. var mystring = response[i].id; var en = "@Gallery.Get.DemoService.Arrange("44")"; i want t...
(0) odpowiedzi
2018-01-07 12:01 Field won't show in Razor View »
I have the following domain defined as classes: public class Unidade { public int UnidadeId { get; set; } public string Apelido { get; set; }...
(0) odpowiedzi
2018-01-07 11:01 Redirecting to another view is not working »
i want to redirect from view1 to view2, but it is not working and i cannot figure out why. it stays on the same view (path is still: "Home/view1" and ...
(1) odpowiedzi
2018-01-07 06:01 asp.net mvc ActionLink and Unauthorized user »
I have problem while creating mvc application, and I can't find right answer I've got following Action link: <div> @Html.ActionLink("Home"...
(1) odpowiedzi
2018-01-06 08:01 While filtering, how to POST a SearchModel, but GET a different ResultsModel back in the view »
I am creating a filter view to find records. This example on SO helps, but does not mention how handle the (Filtered) View. The err below is because...
(1) odpowiedzi
2018-01-06 07:01 Chinese characters are not displayed properly in asp net core razor account page »
I am working on my first website project. I pick the asp net core 2.0 and I got a problem. After creating the project from the template, I change some...
(1) odpowiedzi
2018-01-06 06:01 Bootstrap Multiselect in ASP.Net Core Razor Page »
I am unable to get the bootstrap multiselect drop-down to work in my View. I simply get the button pictured here . However, clicking on it does not t...
(1) odpowiedzi
2018-01-05 21:01 @HTML.HiddenFor value not populating in view »
I'm creating a new record and returning the new record to the view. My view: @using (Ajax.BeginForm((string)ViewBag.EntityControllerUpdateAction, "C...
(0) odpowiedzi