Questions for asp.net-mvc


6290

Scriptmanager Asp.Net Mvc

I'd like to have some of the scriptmanager features in the new Asp.net MVC model
4852

Whats the difference between Html.Label, Html.LabelFor and Html.LabelForModel

What's the difference between @Html.Label(), @Html.LabelFor() and @Html.LabelForModel() methods?
3187

Listing the contents of a database file which is to be displayed in a View

I'm using an open source fingerprint recognition program written in C# (SourceAFIS) which stores the enrolled users in a .dat file.
1253

Html.BeginForm not passing parameter

I have the following code that populates a Drop Down List and auto submits a form but it’s not passing the id back to the controller.
7376

What's the deal with ASP.NET 3.5 Extensions Preview 2?

I'm trying to get the MVCToolkit working with an ASP.NET MVC Beta application and ran into an unresolved reference to System.Web.Extensions version 3.6 (ASP.NET MVC Beta comes with System.Web.Exten...
6697

MvcMusicStore No elements in sequence

I am working through the Mvc Music Store tutorial and am stuck on this LINQ query as it keeps telling me that the sequence has no elements. My model matches the model in the tutorial and I have ins...
5834

Ajax file upload in mvc application

in my MVC app i using Ajax upload (Version 3.5 (23.06.2009)) in this part of code:
7684

ASP.NET MVC generate subdomain URL in View

How do I generate a subdomain URL in the view? For ex, My application is on www.lol.com, which could change sometime in the near future. I want to link to email on google apps located on the subdom...
3143

IE8 in windows xp opens .pdf, but not in windows 7

I have a site that lists customer letters, and when a letter's "view" button is clicked it uses JavaScript (window.open(url)) to open a new window to get the .pdf file, which I think is generated by
9364

Forms in MasterPage and Views

I have a master page which all my views inherit from. The issue I am having is with the form tag which is created in the master page and then the form tag which is created in view.
9266

how to use conditions in telerik grid

I am having a telrik grid in my MVC 3.0 application. In grid I want to disable one of my column based on dates .
4858

ASP.NET MVC: How do I pass a list (from a class in Model) to a repeater in a View?

How do I do the above? I've started using MVC and I'm having issues passing data around.
5735

Why ASP.NET MVC bothers to have a Default.aspx file?

When create a new ASP.NET MVC project in Visual Studio 2008, there is a Default.aspx page by default. It has one line
634

Account Profile MVC .NET

I have been doing some research about how to do custom profileprovider in .NET MVC.
5737
1529

Unable to cast object of type WhereListIterator<system.web.Mvc.ListItem> to type system.web.mvc.listitem

I have a SelectList that I first check for a selected value != null and then want to use this selectedvalue in a where clause for a filter. Like so:
3741

How to use a javascript variable in url.action with ASP.NET MVC WebForms view engine

I want to redirect the user to a url in a javascript function.
6332

The type or namespace 'Mvc' does not exist in the namespace 'System.Web'

I recently installed VS.NET 2012 and moved my ASP.NET MVC 4 project over. However, on building the solution I get hundreds of errors with :
9165

Using a Base Controller for obtaining Common ViewData

I am working on an ASP.NET MVC application that contains a header and menu on each page. The menu and header are dynamic. In other words, the menu items and header information are determined at
3187

Serve static single page apps (static html) to only authenticated users with ASP.NET MVC

I am making an ASP.NET MVC site which needs to serve a number of single page apps.
4477

Why is this query string invalid?

In my asp.net mvc page I create a link that renders as followed:
2558

ASP.NET MVC Folder Controller Html.ActionLink

I have the following code in my Site.Master page of an almost empty ASP.NET MVC Project.
6431

Single strongly Typed Partial View for two similar classes of different types

I have a Register Primary View which shows two different types of Addresses 1. Home Address 2. Mailing Address
7359

Code equivalent for Html.EditorFor()

Anyone know how you can call a functional equivalent to Html.EditorFor() from the Controller?
9259

ASP.NET MVC passing an ID in an ActionLink to the controller

I can't see to retrieve an ID I'm sending in a html.ActionLink in my controller, here is what I'm trying to do
9589

Entity Framework SQL Server increments an Id Key out of order if previous values are available

I have an MVC4 website and it has a SQL Server DB that contains its posts. On each post there is a Next and Previous button. These buttons are calculated from databaseContext.Post.Count() plus or m...
6441

How would you convert this to valid VB.NET?

I found an article on removing whitespace from my markup in ASP.NET MVC, however, when I use the code converter, the "function" is not properly converted
940

How to use Autofac in a 3 layered web application (ASP.NET MVC)?

The examples I can find use a two layer architecture, where the controllers directly use the repository classes in the data access layer. See here or here.
4092

In ASP.NET MVC, how do I get the mangled name of a control when a form is submitted?

I've got a form inside an &lt;asp:Content&gt; block that is being submitted to a controller. For one of the controls, I need to get some information from it directly that won't happen automaticall...
9763

Web: View raw content of a file from the FileName and the FileContent

I'm using ASP MVC, and I want to allow the user to download/view files from my web server.
2548

How do i pass a complex object to another View in ASP.NET MVC?

I'm trying to pass a complex object (that can be serialized, if that helps) to another view.
7188

Can I precompile my ASP.NET MVC application?

I tried to precompile my ASP.NET MVC application and deploy it to an IIS6 box (with wildcard mapping), however I am getting an error with rendering partial views (user controls). Its working fine ...
3519

jQuery not submitting my form to an asp.net mvc controller

I'm trying to submit a form via ajax to an MVC controller.
3032

Ninject.Web.MVC + MVC3 throws StackOverflowException

I've got a simple web application using ASP.NET MVC3 and Ninject.Web.MVC (the MVC3 version).
2732

IE7 & 8 Cause Excel to Prompt for Credentials

I have an ASP.NET MVC3 website with custom authentication (i.e. &lt;authentication mode="None" />). It's hosted on IIS with only Anonymous Auth enabled to support some SSO work we're doing. That'...
2421

url.action, jquery, and mvc

I'm building an application that will shutdown a server, ping that server, and notify the user if the server has been shutdown. If it does not shutdown successfully, it allows the user to "Try Aga...
5638

passing mocked parameter to mocked interface

I am using nuit with moq to test my controllers.
3946

Images issue when deployed using publish

I am using MVC 3.0 and my images work fine when I run from Visual Studio IDE. But when I publish to a file system, my images are not being displayed. Here is the snippet of code that doesnt work when
1369

MVC Pass ViewBag to Controller

I have a Viewbag that is a list that I am passing from the Controller to the View.
6744

Render.model in aspx

I'm working on sample program to show scheduler-net from this site:
5547

Creating a JavascriptConverter for a Generic Type

Suppose I have a generic class called MyClass&lt;T&gt; how can I create a JavascriptConverter that will be used for any T possible (be it MyClass&lt;OtherClass&gt;, MyClass&lt;SimpleClass&gt;)?
9902

Bind a ViewModel to a DropDownListFor with a third value besides dataValueField/dataTextField

When I show a list of testplanViewModels in my View and the user selects one the SelectedTestplanId is returned to the Controller post action. What should also be returned is the TemplateId which b...
4180

When Selecting Multiple Values in Listbox getting exception Index was outside the bounds of the array in Linq to Entity

I have a multiple values in ListBox. When I am Selecting a Single Value my code is working fine.
4687

MVC3 Managing Remote Validation Exception

i have the following problem:
8899

downloaded zip file using c# code is invalid

I have a Dot Net MVC server that stores some zip files. I'm able to download these zip files successfully if I click on the hyperlink. However if I try to download the zip file using WebClient's
9458

ASP.NET MVC2: How to include js script/resource files compiled into dll?

Is there a way in ASP.NET MVC to reference the resource files compiled into dll on the master/view? I'm looking for something similar to the ASP.NET way:
2599

JQuery test failed…need solution

I did everything mentioned on http://volaresystems.com/Blog/post/Autocomplete-dropdown-with-jQuery-UI-and-MVC.aspx but i got nothing when i type a-z in my textbox
6206

Returning a Built-In EditorTemplate as a PartialView in an Action

Is there a way to return a built-in editor template - not a custom editor template - as a PartialView in an action?
1673

When I try to debug the project all the test auto run. How I stop this

When I debug the project for viewing and fixing design issue than I see all the test are running as well. How I stop this so that my tests don't run while working on my UI project?
3448

MVC Advantages of Unit Testing Controllers

My application already has unit test for domain layer I would like to know what are the pros/cons of unit testing controller

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.