Data dodania Pytanie
2017-05-24 13:05 How to Select/ Get Razor Html Helper Tag By Jquery »
Here it is my razor code: @Html.DropDownListFor(m => m.CategoryId, new SelectList(Model.CategoryLookUp, "Value", "Text"), new { @class = "form-co...
(1) odpowiedzi
2017-05-24 04:05 MVC List to jquery »
I am having an issue pushing a list from my C# model in razor to jquery to play with! So assume my List is working well and I am able to see the data...
(3) odpowiedzi
2017-05-23 13:05 Linking to another page in pdf abcpdf8 »
I'm trying to create a link in a pdf to another page from a .Net cshtml file. after some research I've found that the best way to go about this seems ...
(1) odpowiedzi
2017-05-23 11:05 Comments from end of line to beginning of new line, performance benefit? »
I've just opened an existing ASP.NET Webforms project and it is full of the following pattern: ... --%><td class="rptOne"><asp:CheckBox I...
(0) odpowiedzi
2017-05-23 11:05 C# razor object is not defined on click »
I have following code in my index.cshtml where a FoursquareInfo object is beeing created. @using WebMatrix.Data; @using CanYouPay.Models.FoursquareAP...
(2) odpowiedzi
2017-05-22 19:05 String encoding during page render »
I am experiencing an odd problem as the page is being rendered in the browser, or so it seems. In the Model I have public string ReviewWrapperUrl ...
(0) odpowiedzi
2017-05-22 19:05 Query string inside ASP.Net Core Razor view »
How to output ampersand & as part of query string in razor view? Let's say we have script element and some jquery code inside view: $.ajax({...
(2) odpowiedzi
2017-05-22 09:05 Editing querystring in aspnet core »
My simple usecase is changing page number. Like: http://localhost?page=1 to: http://localhost?page=2 I would like to be able to add/update/remove seg...
(1) odpowiedzi
2017-05-21 22:05 Multiple routes with differents parameters for the same action »
I'm currently building an ASP.NET project with differents routes for the same method. My current code is: [Route("evenements/categories/{slug}-{id}...
(1) odpowiedzi
2017-05-21 09:05 Pass C# variable to helper function in jsrender template »
I need to pass one of my model value to the function in jsrender template. I tried using @ for accessing the C# variable, but its not working. Below i...
(2) odpowiedzi
2017-05-21 08:05 Uploading Image in Asp.net mvc Controller »
I have a Upload form and I want to pass my information such as an Image and some other field but I don't know how can I upload Image .. This is My m...
(1) odpowiedzi
2017-05-20 23:05 When exactly to use quotes in composite string formatting with razor? »
This string formatting answer solved my problem, but doesn't explain why razor syntax in string formatting works in the following way... <button t...
(1) odpowiedzi
2017-05-19 20:05 How do you modify the HTML that's currently being displayed in the browser when the user changes the selected option in a <select> element? (asp.net) »
Sorry, I am new to web development and ASP.Net. How do you dynamically modify the HTML that's currently being displayed in the browser when the user c...
(1) odpowiedzi
2017-05-19 12:05 The foreach block is missing a closing "}" character. Make sure you have a matching "}" »
I'm getting error: The foreach block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters wi...
(1) odpowiedzi
2017-05-19 10:05 Custon Razor HtmlHelper conflicts with namespace at runtime »
I have created a custom WebViewPage. That allows me to add a custom helper to the use in my Razor views: public abstract class CompanyNameWebViewPage...
(0) odpowiedzi
2017-05-18 22:05 asp.net MVC - Bizarre Index out of Range when iterating Dictionary in Razor View ONLY »
I am getting a strange 'Index was out Range' exception when iterating through my viewmodel's dictionary property which is simply int Key and List of o...
(1) odpowiedzi
2017-05-18 13:05 Identity is trying to duplicate the email property when I insert a user »
So I have an asynchronous Task method where type T = ActionResult to create a new user to be stored in the database (DBMS = SQL Server). This used to ...
(1) odpowiedzi
2017-05-18 11:05 Foreach loop in view: The ObjectContext instance has been disposed and can no longer be used for operations that require a connection »
I am buidling a mvc web application with entity framework. Error: An exception of type 'System.ObjectDisposedException' occurred in EntityFram...
(1) odpowiedzi
2017-05-17 16:05 Displaying object ToString() value in View »
I have an ASP .Net Core MVC 1.1 web app. In it, I have a view - Details.cshtml which simply displays a selected record: @model InspectionsData.Models...
(1) odpowiedzi
2017-05-17 15:05 Asp tag helper not working with razor »
I am creating a partial view for rendering inputs for a list. The problem is that I need to supply the asp-for attribute with razor code like this: @...
(0) odpowiedzi
2017-05-17 15:05 Populate DropDown List using JQuery in ASP.NET MVC (Active Directory request) »
EDIT: The below code works, for anybody who would need! This question is asked alot but couldn't find help for this specific one. I need to show a dr...
(2) odpowiedzi
2017-05-16 19:05 How To Change Default View In MVC 4 Web Application »
By default, MVC 4 in Visual Studio 2017 sets _Layout.cshtml as the default layout for all pages. I believe it's doing this in App_Start/RouteConfig.cs...
(2) odpowiedzi
2017-05-16 13:05 DateTime validation not working despite a field with identical code working perfectly (in C# MVC, ASP.Net Core) »
Edit 1 Just to Clarify a couple of points, The datetime picker/script appears to be working fine, the times and dates are selectable and fill the t...
(0) odpowiedzi
2017-05-16 11:05 ASP.NET Core: How to localize Html.ValidationMessage? »
I use the following snippet in my .cshtml file: @Html.ValidationMessage("loginError") And this in my Controller: ModelState.AddModelError("loginEr...
(1) odpowiedzi
2017-05-15 21:05 Razor syntax in core class project »
I've added a core class project to my solution with a controller and view. The solution runs and loads the controller and view fine. The problem is ...
(1) odpowiedzi
2017-05-15 09:05 Check for ID in two strings with Razor »
I am trying to compare two strings containing IDs with Razor, but I can't figure out how to do the compare correctly. I have two list. List 1 which ...
(1) odpowiedzi
2017-05-15 03:05 How to Add ID to Html.ActionLink - Same as You Would In HTML / CSS »
I have a line of code in a .cshtml file: @Html.ActionLink("LION TECHNOLOGIES", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" }) ...
(1) odpowiedzi
2017-05-14 15:05 Razor attributes on Text Field vs Password Field »
I am using ASP.NET MVC 5. Text Field (notice the htmlAttributes): @Html.EditorFor(model => model.EmailAddr, new { htmlAttributes = new { @cla...
(2) odpowiedzi
2017-05-14 06:05 How to select default value for DropDownListFor using ASP.NET MVC »
I need to display dropdown text based on DB values. I'm not able to find a solution. DB Value: RolesID DeptID UserID 2 1 100 5 ...
(1) odpowiedzi
2017-05-14 00:05 Is it safe to combine .aspx and .cshtml pages in a same project? »
I am working on a MVC project. All of my pages so far have been .cshtml, but I'm working on a new one that requires dynamic tables that don't lose the...
(1) odpowiedzi
2017-05-13 22:05 How to set dynamically default value for DropDownListFor using asp.net mvc4 »
Dynamically i should load dropdown list and display the selected value. but dropdown loaded sucessfully but default value not selected. @gt.PlantId -...
(1) odpowiedzi
2017-05-13 15:05 When to use @using in my razor syntax view in ASP.Net MVC 5 »
And yes, I searched it on google I could not find the exact answer. So, When to use @using SomeModel in my razor syntax view. I am new to ASP.net MVC...
(3) odpowiedzi
2017-05-13 00:05 Umbraco 7.6.1 Upgrade Login Issue - 400 (Bad Request) »
After Upgrading from Umbraco 7.5.3 to 7.6.1 I have become unable to log in to the backoffice as an admin. I have checked in the Users Database and u...
(1) odpowiedzi
2017-05-12 12:05 UTC to local time (browser time, not server time) »
I have a web page, with some fields containing a date and time. The dates and times are stored as UTC. I would like to convert them to a local date t...
(0) odpowiedzi
2017-05-12 08:05 error while posting pagedlist from view to the controller »
I've an indexed page in MVC with data that displays in a table format from the database and using paging. I want to edit only one column of the table....
(1) odpowiedzi