Data dodania Pytanie
2017-06-16 19:06 Conditional OnClick With Razor in MVC C# »
I have a variable named wURL which contains a URL. If the URL is NULL I would like to not have the onclick Event in my TD. My trouble is figuring ou...
(3) odpowiedzi
2017-06-16 15:06 Wrap content with link if condition = true? »
What is the best way to wrap some elements inside a link, if a condition is true? So, lets say i have this markup: <div> <h1>Header&l...
(2) odpowiedzi
2017-06-16 13:06 MVC 5 - Prevent user from creating record in One to (0..1) relationship if a previous record exists. »
So I have a Customers model which needs to have a one to zero-or-one relationship with AspNetUsers. The way I want this to work is for a user to regis...
(1) odpowiedzi
2017-06-15 23:06 Separate variables in cshtml »
I have two nested C# for loops in cshtml and I want to concatenate the variables i and j with an underscore in a button tag. I've tried the following:...
(1) odpowiedzi
2017-06-15 23:06 How do I create a nested object from the container object's create controller/view in MVC? »
I am new to MVC and am struggling to get my head round it coming from a web forms background. I have two classes for a timesheet application, Week an...
(0) odpowiedzi
2017-06-15 17:06 How do I get the dropdown datatype for members to print to the page? »
I was wondering how I would make a html drop down list from the values in a datatype? It needs to have the prevalue as the name and the associated ID ...
(1) odpowiedzi
2017-06-14 17:06 How to render HTML content coming from Model »
So, I have a wordpress like website in ASP.Net MVC 5, where I can create website for my customers. Now one of the customer's website needed a text box...
(1) odpowiedzi
2017-06-14 14:06 How to pass a Javascript List object in @Html.Raw(@Url.Action())? »
How do I pass a Javascript list object in @Html.Raw(@Url.Action()) ? I have a Model in my controller which has the following properties as the js Li...
(2) odpowiedzi
2017-06-14 10:06 LINQ query for a GroupBy and how this is displayed in razor view »
I have a class called MeteredGenerationInformation that contains three relevant fields to the question SettlementDate, GenerationUnitMeteredGeneration...
(2) odpowiedzi
2017-06-13 21:06 Retrieve URL from MVC ViewData in jQuery »
Struggling with this a bit. I'm passing an absolute URL from the controller to View and trying to retrieve the URL in the jquery to pass it to an Ajax...
(2) odpowiedzi
2017-06-13 17:06 How to order a table in a specific order based on condition of the table data in asp.net? »
My Issue: I am looking to order a table which i have set conditions on to display by a type. For example, i have conditions which make a row green, a...
(1) odpowiedzi
2017-06-13 04:06 Javascript in a View Component »
I have a View Component that contains some jQuery in the Razor (.cshtml) file. The script itself is quite specific to the view (deals with some some c...
(1) odpowiedzi
2017-06-12 17:06 How to pass current Url with query strings into Html.ActionLink() function in MVC »
On the https://www.willistowerswatson.com/en/press page, select "Exchange Solutions" in the "Services" facet, and note how the query string changes to...
(1) odpowiedzi
2017-06-12 14:06 Knockout: Click button created server side »
I have a razor view with a partial view inside. Within ProductBooking partial I am sending the data and creating a list of prices in a controller, ad...
(1) odpowiedzi
2017-06-12 10:06 how to increment object property name in a loop »
in my list of objects i have few similar properties. week1 week2 week3 week4 week5 ... I would like to be able to display them in a table based on ...
(2) odpowiedzi
2017-06-11 17:06 Use Angular Id value from ng-reapt in a razor @Url.Action link »
I am trying to pass values to my controller action from link in View: Controller: public ActionResult Details(DetailsViewModel vm) { if (vm.CarI...
(1) odpowiedzi
2017-06-11 17:06 Could not install package 'Microsoft.AspNet.Razor 3.2.3' in Visual Studio 2015 Nuget package manager »
I tried the following: I am trying to open a code set created in VS 2010 (pluralsight exercise) in VS Community 2015. The System.Web.Mvc reference ...
(1) odpowiedzi
2017-06-11 01:06 Custom Relative Path In Asp.Net Core MVC »
Is there any possibility to have a custom relative path same as example at below: In Razor: <script src="%/scripts/theme.js" type="text/javascrip...
(2) odpowiedzi
2017-06-10 18:06 Runtime compile other files than cshtml views »
I'm working on an ASP.NET MVC 5 + WebAPI 2 application. For flexibility purposes, the stakeholders insist that the integration guys should be able to ...
(0) odpowiedzi
2017-06-10 11:06 how to validate selectize dropdownlist in mvc 4.5? »
I am working with mvc in framework-4.5. In all other fields validation is working properly, but i am finding it difficult for selectize dropdownlist. ...
(0) odpowiedzi
2017-06-10 06:06 Binding to a Readonly property which returns another property in mvc »
Let's say I have an Entity with 3 properties A, B, and C of same complex data-type. Now I have defined another not mapped, read-only property D of the...
(0) odpowiedzi
2017-06-09 17:06 CSS Background-Image url() on remote server gets encoded »
I have a resource on an external server that will need to be used for a dynamic background-image, and the link to the resource contains a query string...
(1) odpowiedzi
2017-06-09 17:06 CSS Textarea Not Filling Parent »
I am having issues getting a text area to fill a parent div. I have found solutions involving setting the box-sizing to border-box, but this is not wo...
(1) odpowiedzi
2017-06-09 16:06 html.hiddenfor error when rendering view outside controller as string »
I need server side page render (without request) outside controller(I want to render view outside controller). To do that, i need a fake HttpRequest...
(0) odpowiedzi
2017-06-08 21:06 Unable to call @Html.Action() in jQuery »
I'm trying to get the html from one of my partial views into a div tag with the id "searchpage" in my main view. However, when I follow the syntax in ...
(3) odpowiedzi
2017-06-08 14:06 MVC Model Binding Complex Type to Action Parameter »
I'm binding a list of customers into a customer search results page using the model binding of MVC3, and using Razor to render all the customers in a ...
(1) odpowiedzi
2017-06-08 13:06 Show and Hide element from Script and/or from Razor Model View with MVC »
I have an element in a Razor View: <div class="label">When? *</div> That I need to show in a View based on a ModeView condition: <d...
(2) odpowiedzi
2017-06-07 16:06 AspNet core MVC 1.1.3 Default selected radio button »
I am trying to default a radio button to be checked. <div>@Html.RadioButtonFor(m => m.IsActive, "OofDeactive", new { @class = "isActive", @c...
(2) odpowiedzi
2017-06-07 13:06 how to perform pagination in List inside a model in mvc razor »
I have a model like: public class Customer { public string Name { get; set; } public string Address { get; set; } public List<Contacts...
(1) odpowiedzi
2017-06-07 02:06 Razor & Null Coalescing - not working under explicit C# 6 MVC 5 project »
Current project: ASP.NET 4.6.2 MVC 5 Visual Studio 2015 Community v14.0.25431.01 Update 3 Installed the CodeDOM Providers for .NET Compiler nuget pa...
(0) odpowiedzi
2017-06-06 16:06 How to change formatting of Html.DisplayFor for a user-defined class in MVC »
My main model, Project, has a property called "ProjectAddress" which is of type "Address"--a class that I defined. Address has the properties Line1, L...
(2) odpowiedzi
2017-06-06 15:06 ASP NET MVC RAZOR Upload Multiple Images FileList »
I'm new in asp net and I have a List of images and I want to send through javascript to the controller. I'm using FileList and here is an example. .C...
(2) odpowiedzi
2017-06-06 12:06 Send data to controller method using Html.BeginForm() »
LoginController public class LoginController : Controller { [HttpPost] public ActionResult CheckUser(string Name, string Password) { ...
(0) odpowiedzi
2017-06-05 22:06 Unable to change RadioButtonFor selection via JQuery »
I am working on code to determine whether or not to show a contact information section. To do this I am implementing the RadioButtonFor html-helper w...
(1) odpowiedzi
2017-06-05 22:06 How to apply bootstrap v4 alpha's form input validation classes with ASP.NET Razor syntax? »
So, bootstrap v4 alpha has changed form validation classes a bit. Now, to apply validation styles to a form input, you apply the CSS class to the pare...
(1) odpowiedzi