asp.net-mvc

tools to measure asp .net web application performance

HI, Can anyone suggest good tools to analyze asp .net application performance and find the bottle necks? Thanks SA ...

How do I pass List<T> type from one action to another action in controller

I am trying like return RedirectToAction("Index", new { Name = Name }); where name is string type. and it is working but how do I pass list to another action? ...

TinyMCE content blank on MVC Post Action

I have a standard form with a textbox with tinymce invoked. All is well however when I post to my action the FormCollection for that field is blank. I have set ValidateInput to false just in case but still blank. I believe the issue is because I am posting using the jQuery Form plugin. Thanks ...

ASP.Net MVC ActionLink

I'm trying to create an ActionLink in one of my views that sends the selected value of a dropdown list to a new action. So far I have this, I just need to find a way to populate the ID on the end of my ActionLink. <%= Html.DropDownList("StatusDropDown") %> <%= Html.ActionLink("Apply","Index",new {Controller="Tasks", Action="Index...

Replicate Webforms GridView in ASP.NET MVC

Is there a realistic way to implement a webforms stylegridview in ASP.NET MVC, with inline editing? I have found various solutions to get a grid with inline editing working in MVC using JQuery add-ins but so far they have been very messy, require an unrealistic amount of work and that all gets worse when you want to add client and serve...

Render partial form in jQuery dialog

Hi, Most of you probaly know Nerddinner.com, and my page is much like that, so let's imagine doing this to Nerddinner. When editing a dinner, you'll be redirected to Dinners/Edit.aspx, and presented of the partial view DinnerForm.ascx of type DinnerFormViewModel. What if you wan't this DinnerForm presented in a jQuery UI Dialog? I'm ...

Looking for examples of ASP.NET MVC applications with the Entity Framework

Are there any open-source examples of ASP.NET MVC applications that use the Entity Framework? I have found Nerd Dinner to be helpful but it is using Linq to SQL. I am trying to use the Entity Framework in a strongly-typed ASP.NET MVC project and am finding that anything beyond the simple tutorial becomes rather difficult to implement. ...

Weird problem when Posting to an ASP.NET MVC action.

Hi folks, I've got a simple html form with a few input boxes. When i click save, it finds the correct method but the data is weird. When i have a form field name that is the same name as a field in the route, the value passed in is my form field data, not the route data. for example. Imagine u have the following route. // Both Get/Po...

Caching partial views in asp.net MVC

Hello, I have the following situation on a webapp: A table "Employees" contains column "Department" and "Function". Both are dropdownlists. The "Function" dropdownlist options depend on the selected "department". (so each department has its own list of functions) When changing the department, I do an ajax call to a controller actio...

Unittesting Url.Action (using Rhino Mocks?)

I'm trying to write a test for an UrlHelper extensionmethod that is used like this: Url.Action<TestController>(x => x.TestAction()); However, I can't seem set it up correctly so that I can create a new UrlHelper and then assert that the returned url was the expected one. This is what I've got but I'm open to anything that does not inv...

Security Concerns When Working With New Technologies

Do you find that when you work with a new technology that you're never quite sure what security gaps your leaving in your code? I've been working with ASP.Net Web Forms for about 5 years now and am fairly confident my code is at least secure enough to stop most known attacks. Looking back a lot of my early code I have unknowingly left ...

how to display Flash (swf) content in ASP.NET MVC

In our WebForms apps we serve flash via simple anchor tags like so: <a href="whatever.swf" class="something" params="with, height, yadda, bang">See It</a> Now, I'm wanting to move that A tag into a call to a Controller/Action using an Html.ActionLink like so: Html.ActionLink("See It", "DeliverFlash", new {fileName="whatever.swf"}) ...

How to include js files in asp.net MVC and have a valid path on all routes

I created a default ASP.net MVC project. In the Master page I have the following at the top <head runat="server"> <title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title> <link href="../../Content/Site.css" rel="stylesheet" type="text/css" /> </head> I then need to add a javascript file and added the line as...

How to dynamically alter the class of an Html.ActionLink in MVC

I'm looking for a way to alter the class of an ActionLink in the controller based on specific criteria (not found in the model so I can't write a conditional in the view itself). But i can't seem to find the ViewData("name") that allows me to work w/ this element (I assume this is possible, but I'm missing something). I have an html he...

RenderPartial and Dynamic Selection of Partial Views

My MVC application contains a parent model, which will contain 1 or more child models. I have set up the main view to display properties from the parent model, and then loop through a collection of my child models (of various types, but all inheriting from the same base type). Each of the child models have a corresponding partial view....

Multiple Possible RedirectToAction

It is very possible that a given controller method may get called by several other controller methods in an application. When that happens, the given method needs to have a way to determine where to Redirect back when done. What is the appropriate way to inform the method which one of the possible Redirect choices to execute. I suppose o...

Second Call to Ajax get the First Result Allways

I Using this code <script type="text/javascript"> $(function() { $('#DoTask').click(function(event) { event.preventDefault(); // added this $.getJSON('/TareasBackGround/DoTaskInteractivo', null, function(response) { $('#ResultadoEjecutarTarea').html("<br />Resutado:" + response.res...

asp.net mvc renderaction

<%Html.RenderAction("Index", "Test", New With {.pagetmp = "test"})%> I call the above line in my asp.net mvc view. How do i retrieve the dictionary values from the test controller? ...

Separating two forms in the same view in ASP.Net MVC

I've merged the create account view and the log in view in the same view. So it's a view with two forms, but they get mixed when I submit. If I try to log in and there's an error that is displayed with: Html.ValidationSummary() both forms get the error. And I started to rename fields to loginPassword, createPassword, because otherwise...

Image service for a Application

I am creating and application that need to save images. I don't want to write it if it already exits, Anyone know of a product that I can use so I don't have to develop mine. I am using asp.net MVC. What I want is something with and API that I can save to and retrieve to ( I don't want to store the images in my system if its possible). ...