Data dodania Pytanie
2016-12-30 15:12 Setting Min-Date for DateTime picker »
I am using the Bootstrap 3 Datepicker, specifically the No Icon (input field only) version. I am trying to use the minDate function so that the user ...
(1) odpowiedzi
2016-12-30 00:12 Why Javascript $(document.body) does not load outside of the source file? »
First of, a quick word about my setup. I have a global JS file common.js, where I store all commonly used functions. This file is bundled and set to ...
(1) odpowiedzi
2016-12-29 22:12 Including all file matching regex razor cshtml »
I want to include Angular2 build files in a CSHTML file. Currently, my include is: @section scripts { <script src="~/dist/main.js" asp-appen...
(1) odpowiedzi
2016-12-29 22:12 DropDownListFor method instead of property »
Is it possible to use a method in stead of a property for an This works: HTML.DropDownListFor(x => x.Book, new SelectList(...
(2) odpowiedzi
2016-12-29 10:12 jquery ajax GET pass properties from razor view model »
In the editors in view i enter both name and 0 as socialsecuritynumber but wrong method in controller is called, that one with only name as parameter ...
(1) odpowiedzi
2016-12-28 22:12 using Linq in Razor view produces runtime error »
@if (Model.Any()) { //do stuff } causes a runtime error i have this in my web config <add namespace="System.Linq" /> and have also tr...
(0) odpowiedzi
2016-12-28 11:12 MVC controller multiple views and routing issue »
At the moment we have view name 'Self Deposit' and a controller to back it. The view is a stand alone page that built with partial views: Example Fold...
(1) odpowiedzi
2016-12-28 00:12 Does RedirectToAction only work for HttpGet? »
I am using asp.net core the razor engine. I am redirecting to another function and it was not working when the function I sent it to was a HttpPost. ...
(1) odpowiedzi
2016-12-27 22:12 How to pass values of partial view models on submit from another partial view »
i have this viewmodel public class RHAPostModel { public PostingMain PostMainData { get; set; } public List<MailingList&...
(1) odpowiedzi
2016-12-27 13:12 static HTML controls vs razor html helper »
i am new to asp.net mvc , as i see asp.net mvc generates @Html.TextBoxFor(x => x.Name) this type of controls. which are server side controls like w...
(1) odpowiedzi
2016-12-27 08:12 How do I add a link action inside a grid/column in MVC using Razor only »
I am using Razor grid system to show a listing. I want to make a column as a link action. But my problem is it's showing the link in the font end as r...
(1) odpowiedzi
2016-12-26 14:12 how to pass model from @html.partial »
below is my cshtml code ive used IEnumerable in the main view and and single model object in partial view im doing CRUD operation ...each row has e...
(1) odpowiedzi
2016-12-26 05:12 replacing html helpers by tag helpers »
I want to replace html helpers by tag helpers in View. For this I replacing: @model IEnumerable<Person> by @model IList<Person> and @Ht...
(1) odpowiedzi
2016-12-26 01:12 Jquery each inside onclick event »
Razor/HTML (many of these): <div class="directory-item" id="@item_id" name="@item_name" style="padding-left: @(indent_level)px; display: @(displa...
(2) odpowiedzi
2016-12-25 17:12 Get response after form submit? »
I have a form that I defined with html code below: <form id="addUser" method="post" action=@Url.RouteUrl("DefaultApi", new {controller = "User", a...
(3) odpowiedzi
2016-12-25 15:12 How can I get Intellisense for the tag helpers in VS 2015 MVC Core project? »
In my Razor Views I can get intelligence for my model in most places like HTML Helpers but just not inside tag helpers. I tried everything at these t...
(0) odpowiedzi
2016-12-25 11:12 I'm using Ajax to Post to the controller in Mvc but my var resets to null in the foreach »
So Im using this code to fill my container with Posts from the database. The problem is during the foreach im adding a ID to the onclick for the Like...
(1) odpowiedzi
2016-12-24 23:12 MVC DropDownList look and feel »
So I'm creating a site using MVC, and my DropDownLists and DropDownListFors do not look the same as the other input elements on the page. I tried set...
(1) odpowiedzi
2016-12-24 14:12 Radiobuttonfor not binding with model property »
My radiobuttonfor is not binding with my model property, when selection is changed property stays the value that is is set on construction My ViewMod...
(0) odpowiedzi
2016-12-24 10:12 Cannot get DateTime.Now as string in Razor View »
I want to get current time in a Razor View and use it in Javascript as shown below: @{ string fileName = "Score_List_" + DateTime.Now.ToShortDat...
(2) odpowiedzi
2016-12-23 20:12 Correct way of defining a variable for css theme on MVC »
I choose a css theme on my BundleConfig and I only load the required css files on the shared view. At the time of rendering another view I'm loading o...
(0) odpowiedzi
2016-12-23 19:12 How to keep value of cshtml view object in javascript? »
Inside the cshtml view I have a dropdown list with 2 possible options. If selection returns "True", a container with 2 datepickers becomes visible, so...
(2) odpowiedzi
2016-12-23 08:12 MVC View htmlAttribute not working »
Can I know why the htmlAttribute of my textbox not working? I'm using @Html.BeginForm and only the part Hyperlink not following the other. Below is m...
(1) odpowiedzi
2016-12-22 16:12 How to check the last index of a for loop, if it possible? »
Hopefully this is a easy question, i tried to do what i cound do on my own. But i can't solve the rest part. Out for every row, i want to check if th...
(1) odpowiedzi
2016-12-22 14:12 ASP.NET MVC Razor with Layout - CSS linked but not applied »
I started a Asp.net MVC project and created a main layout and created bundle css groups. Every subpage will have one more css which I need to link on ...
(1) odpowiedzi
2016-12-22 10:12 Views overlapping in MVC application »
I have been stuck with this issue for sometime now. Can someone help me solve this bug. Before I submit the form the following UI gets displayed. How...
(2) odpowiedzi
2016-12-21 11:12 How to unit test static method which is used in the razor view? »
Let's say I have a static class with the following extension method which retrieves the file from the Cache or reads it from disk and puts it in the C...
(2) odpowiedzi
2016-12-21 08:12 How to display count of products in search Brand on search engine in mvc 4 »
Want to show a count of Models in front of Brand Name like : Nokia (10) Phone (20) I have use a foreach tobind a Brand Name Data. Below ...
(1) odpowiedzi
2016-12-21 01:12 Passing in Int to a View »
I need to create a hidden field on my View. The View should just accept an int (Not a model). My controller method to create the view is simply: pub...
(1) odpowiedzi
2016-12-20 23:12 call JavaScript function inside razor foreach statement »
I have looked through several posts but have not found an answer that actually solves this issue so I am asking whilst trying to provide the most pert...
(1) odpowiedzi
2016-12-20 17:12 Importing namespaces in _ViewImports.cshtml »
I'm working on .Net project and I'm using _ViewImports.cshtml file to import namespaces for many ViewModels I have. Similar to what is described at of...
(1) odpowiedzi
2016-12-20 16:12 Setting Conditional Attributes in Razor for ASP.NET Core »
I tried this accepted answer, but it seems like this may be handled differently in the latest version of ASP.NET Core. I got no selected attribute at ...
(2) odpowiedzi
2016-12-19 19:12 ASP.net MVC 5 ViewBag using Razor »
Hey all I'm new to MVC/Razor and I am wanting to simply display a year on the view page. The view page code: <p>© @Html.Raw(ViewBag.t...
(3) odpowiedzi
2016-12-19 15:12 ASP.net MVC 5 Razor dropdown box »
Hey all I am new to Razor MVC and wanted to make a select box that has the past 10 years listed inside it (2016, 2015, 2014, etc....). This is my cur...
(4) odpowiedzi
2016-12-19 12:12 bootstrap alert-danger hide when page loads »
I'm using twitter bootstrap and alert elements to use within my web page and I want to use this as validation summary towards the top section of my pa...
(1) odpowiedzi