FAQ Database Discussion Community


How to take total count from selected checkbox while using from Collection C#

c#,asp.net-mvc-2
In my page, there are check boxes multiple check boxes with values. I am taking this values from collection. I want to take the particular selected check box total count. I tried the following code, But i am getting an error. foreach (string key in collection.AllKeys) { var selectedCount =...

How to upgrade mvc2 to mvc5?

asp.net-mvc,asp.net-mvc-2,asp.net-mvc-5
I've got an old project from a friend that he wants me to do redo. How ever that project is written in ASP.net mvc2. So When I try to open it in visual studio 2013 I can errors. Saying the file is incompatible. How would I go ahead and fix...

html helper - how do I get rid of the name attribute?

asp.net-mvc,asp.net-mvc-2
I have a strongly typed partial view. The model has a property that is a list of users in Active Directory represented by a class called ADUser. I have a partial view that represents a drop down list for this property. While I use the value of this drop list...

Asp.net MVC 2 Request.files[“”] return null always

c#,asp.net-mvc-2,image-upload
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Movies.Models.StudentModel>" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> Create </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <form id="form1" runat="server"> <script type="text/javascript"> $(document).ready(function () { //$('.date').datepicker({ dateFormat: "dd/mm/yy", Date: Date });...

Sessionless ASP.NET MVC 2 requests have sessions yet

asp.net-mvc-2,session-less
As we need Async Ajax requests, it is required to disable session state. Web app is based on ASP.Net 4 - MVC 2. I am aware of [SessionState(SessionStateBehavior.Disabled)], however it is available in MVC 3+. I am using the following method to route specific HTTP requests to a sessionless HTTPContext...