asp.net-mvc

xVal validation with Spring.net

I have started to play with xVal as my validation framework for an ASP.Net MVC application. I use the Spring.Net IoC container to hold the app together. I have followed the instructions on Steve Sanderson's blog to get server side validation working fine. But when I try to get client side working, I get the following runtime exception:...

Use MVCContrib grid for editing

I just started using the MVCContrib grid in a test project. I'm having a difficult time finding information on how to use it for edit/update/delete. Can anyone point me to information on how to put a row into edit mode, or if there isn't such a thing for that grid, discuss a best practice for editing list data in MVC. ...

ASP.NET MVC Paging - Passing complex types back to controller?

Hi, I'm currently working on a reasonably simple MVC app which allows the user to enter some search data, get a list of results, then view each item etc. It's all going rather nicely, however I'm now trying to implement paging but having some trouble. My search form uses HTTP GET, requesting the following action: public ActionResult R...

What is the project(s) that branched asp.mvc?

I remember reading a blog post about a group that had taken a branch of asp.mvc. They intend to use it as a base and fix a number of issues while adding features. Now I can’t seem to work out the magical combination of google keywords to find it. Does anyone know what this project is called? ...

JQuery - does not fire MVC Controller Action

I have the following JQuery code: // When the document is ready, start firing our AJAX $(document).ready(function() { function showValues() { var str = $("form").serialize(); $("#results").text(str); } $(":checkbox, :radio").click(showValues); $("select").change(showValues); //showValues(); // B...

ASP.NET MVC Login ReturnUrl always NULL?

Using Forms Authentication in ASP.NET MVC when trying to log back into a site, it puts a ReturnUrl parameter in the query string. My Logon action method accepts a "returnUrl" string. However it seems that returnUrl string is always null, even when it is clearly in the query string. Any thoughts on why this might be the case or a pos...

mvc - dropdownlist not populating correctly within Edit view

I'm building my first MVC application, having followed the 'NerdDinner' tutorial through. In creating a dropdownlist from a SelectList in the same way, however, I'm running into an issue. For some reason, when I bring up the 'Edit' view, the dropdownlist isn't showing the correct selection, even though the data is set otherwise in the d...

ASP.NET MVC: Using LINQ to XML to render (X)HTML

There has been a lot of discussions on View-engines for ASP.NET MVC and some criticisms against the inline "tag-soup" with for-loops and thing like it. The alternative or complement has been to use HTML-helpers, which are just inline method-calls. When I look inside ASP.NET MVC's HTML-helpers today they are using a class called TagBuil...

Handling complex URLs in ASP MVC

I have - I think - a complex URL to deal with in ASP MVC 1.0: All my actions in most of the controllers require two parameters all the time: Account and Project. This is on top of each Action's requirements. This means a typical URL is like this: http://abcd.com/myaccount/projects/project_id/sites/edit/12 In this example: myaccount is...

How to emulate ScriptManager.RegisterStartupScript() in ASP.NET MVC project

I am using ASP.NET MVC project and jQuery to handle async requests. Sometimes for an async request I need an initialization JavaScript snippet to be returned and executed together with an HTML snippet (I want this JavaScript to be rendered on server). For now I am using my own ScriptsHelper class with a RegisterStartupScript() method (a...

Returning an Action route another MVC project

I'm currently creating an admin tool for a new project which I would like to use to retrieve a url from a different project in my solution. Although the product controller doesn't exist in the project I am calling it from, I would like to retrieve it from the first project. Is this at all possible, or would I need to create some sort o...

MVC - Enabling Forms Authentication

Hi, I have MVC 1.0 app with VS2008. I have added configuration to web.config but the app crashes in the Default.aspx page code behind. Dont know why its loading that page. I am just uing all the default setup for MVC 1.0. This is my webconfig. Shouldn't it show my login page with this config???? Malcolm <?xml version="1.0"?> <confi...

dynamic form asp.net mvc

Hello, my problem is as follows. I have a system to create accounts. However, different users can set different attributes to the created account. That means I get a dynamic form with different attributes for different users. My question is how should I process such a form? ...

Proper way to load ASP.NET MVC partial views with AJAX?

Hey all. Okay here is the situation. I would like to be able to load a series of similar partial views onto a parent page; much in the same way as is being done in this article (simulating AJAX panels). In the article, it appears to be working fine, as it is calling the corresponding action method asynchronously on the controller. Bu...

ASP.NET MVC: Bin Deploying V1 and Beta on same server

Hello, I have ASP.NET MVC Beta on our web server running a few apps. My latest app is getting close to done and it uses the Version 1 of ASP.NET MVC. My idea was I could bin deploy the V1 assemblies and leave Beta installed so it was used by default. This idea doesn't work as it ignores the bin folder and grabs from the GAC (both are...

JQuery comment box similar to Stackoverflow?

A while ago I had asked how to make a collapsible comment box like Stackoverflow The original question is found here However since then I came across another problem which I am not entirely sure how to go about solving, I am pretty sure that I go about it the same way as the original question but, not quite sure of the syntax. Basical...

When I try to save an entity I get the error: Object reference not set to an instance of an object

Hello, When I try to save an entity I get an error: Object reference not set to an instance of an object I am able to create a new entity, the code is almost the same. When I try to save the entity I am able to trace a bit of the code My Controller code looks like this: _entities.Kandidaats.Attach(kandidaatBewerken,true); _en...

ADO.NET Data Services in an ASP.NET-MVC project

I'm trying to add an ADO.NET data service to a vanilla ASP.NET-MVC project. Does anyone know if these technologies are compatible? When I Ctrl+f5 the solution and visit the service URL all I get when is the very unhelpful "Request Error ... See server logs" page. Does the Development Web server even write any logs and if so where? I ...

$.ajax not returning data

I am trying to POST data back to the server and get a dataset back. What I am getting back instead is the HTML for the whole page AND it is not kicking off the Action in my Controller. And yes - JQuery is still confusing to me. The code I currently have is: function updateNavIndex(pageIndex) { var filters = $("form").serialize();...

$.getJSON error on return element

Still working through JQuery to get data and repopulate portions of a page. Right now I cannot get it to return data but it does pop an error saying "data is undefined". Code: var retrieveData2 = function(path, productGroup, productType, itemsPerPage, pageIndex, filters, fnHandleCallback) { $.getJSON(path , { productG...