asp.net-mvc

Could not find schema information for the element 'castle'.

Hello! I'm creating a Custom tag in my web.config. I first wrote the following entry under the configSections section. <section name="castle" type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler, Castle.Windsor" /> But, when I try to create a castle node inside the configuration node as below <castl...

Add a simple route

Hello I'm trying to add a route that shows some data based on a string parameter like this: http//whatever.com/View/078x756 How do I create that simple route and where to put it? /M ...

How to know which radio button is selected on a view?

Hi, I have a created a list view for one of my controller's index action. I have added a new column "Select This" to this list view, by using the view's source. The column will contain radio button for each entry in the list. This i have achieved by just placing a radio button control from tool box in the "Select This" column. This i ha...

Route doesnt register

Hello I have this route registered: routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Views", "View/{RouteID}", new { controller = "BookingViewsPublicController", action = "Index", RouteID = "" } ); routes.MapRoute( "Default", ...

What kind of bloody hack is ",this.uiDialogTitlebar).html(f||"

Hi there, I have rebuilt my website with ASP.NET MVC and using all the goodies from that like jQuery. Recently, I'm constantly getting couple of times per day error notification from my website about: Illegal characters in path The request URL includes my domain, my JS folder and then a piece of weird JS syntax in it. Here is an example...

How to pass parameters to Controller-Action using LinkButton Click

Hi, I have a list view for one of my controller's index action. In that View's source, I have added the following code to the for loop present inside the source of View. <%= Html.ActionLink("Select", "ActionName", new object { controller = "Home", action = "ActionName", iID1 = Convert.ToInt32(ViewData["ID"].ToString()), iID2 = Convert....

Linq to sql - Linked lists

Hi! I'm having a linq to sql schema with a entity "Customers" as well as "Reports". Each customer has zero or more reports. I want customers to have a LinkedList property, so that i easily can access the next and previous entity for each report. What would be the best way, if any, to implement this using linq to sql? Thanks ...

Differences between ASP.NET MVC framework and Entity Framework

Hi, I'm going to be starting a new project with ASP.NET and I would like to use some framework which speed up the process. Recently I have heard that there are two main frameworks in that platform: the MVC and the Entity framework. Are they compatibles? If not, what are your advices on what to use and why? What are they best properties?...

MVC & SelectList

Is there a way to output select list to a string in the View ? //Javascript var comboHtml = <%= Html.Encode(Model.MySelectList.ToHtml()) %> or would i have to enumerate the list my self to create the html, need this for a dynamic form field. ...

Uploadify (Session and authentication) with ASP.NET MVC

When I use Authorize filter on an action or a controller used by uplodify (http://www.uploadify.com/) the action isn't reach... moreover Session are not retrieved. I found this to retrieved user session : http://geekswithblogs.net/apopovsky/archive/2009/05/06/working-around-flash-cookie-bug-in-asp.net-mvc.aspx But how to use it with...

The element 'configuration' in namespace 'MyWindsorSchema' has invalid child element 'configSections' in namespace 'MyWindsorSchema'

Hello, In order to create the following section, <section name="castle" type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler, Castle.Windsor" /> I downloaded and put the "CastelWindsorSchema" in my C drive (as it was suggested by the read-me file). I referenced it this way in the Web.Config: (I kept e...

ASP.NET MVC: using same ViewModel for rendering page and getting results

Here's simple view model that I use: public class ViewModel { public Order Order { get; set; } // returned from page - also can be pre-selected public string[] SelectedProducts { get; set; } // data for page to render available products to select from public IList<ProductViewModel> AvailableProducts { get; set; } } public Act...

How to update a view part on change of a select tag

Hi, Using ASP.Net MVC 1.0 I have a form with some input control on it. One of them is a dropdown (select). When this dropdown gets changed by the user I like to update a DIV-tag using RenderPartial() or something like this. My view currently look like this: <% using (var form = Html.BeginForm()) { %> <label for="FieldIdentif...

How to generate and transmit a JavaScript variable from MVC Controller?

I'm trying to fill a JSON object with a list of items from the database when the page first loads. This list of items comes from the database. Right now, I've strongly typed the View and am looping through the list of items to build an HTML unordered list, and then in the JavaScript building the JSON object from what's been output in the...

What are the possible ways to prevent form from double posting in ASP.NET MVC?

During a log inspection of my ASP.NET MVC application I discovered that some users managed to post same form twice. I tried to reproduce it but I failed. Anyway I'd like to prevent users from posting same data twice. Is there any canonical solution for that in ASP.NET MVC or I have to develop my own custom solution? I case of custom sol...

Putting an ASP.Net MVC project on a server for team development with VS Pro Team version

Can anyone give me advice on where to start when it comes to setting up a project on a server so that my helper and I can check out code files? I have a hosting account with Go Daddy - IIS 7, if that can be used. Also, I'm looking for advice on how to learn more about setting up my database on a server - currently my project has it set...

ASP.NET MVC, JSON post to controller action with FormCollection parameter

I have a bunch of controller actions mostly used for saving data to backend storage. For now most of them use a signature like this: // // POST: /WidgetZone/Create [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create(FormCollection collection) as you can see, it accepts FormCollection. This works fine with classic ...

ASP.NET MVC Email

Is their a solution to generate an email template using an ASP.NET MVC View without having to jump through hoops. Let me elaborate jumping through hoops. var fakeContext = new HttpContext(HttpContext.Current.Request, fakeResponse); var oldContext = HttpContext.Current; HttpContext.Current = fakeContext;...

User jQuery to drag a DIV and drop in a TD ... and have the DIV "snap" into place

I am finishing up a rewrite of task management system, and am in the process of adding drag and drop capabilities. I want the user to be able to drag a task DIV from one column (TD) and drop it in another column (TD). I have this working correctly, save for some minor formatting issues. I have the TD with a class called droppable tha...

handling exceptions IN Action Filters

Is there a better way to handle exceptions that occur inside an Action Filter itself in ASP .NET MVC? There're 2 ways I can think of at the moment. Using a try catch and setting the HTTP Status Error code and message directly when an exception occurs Response.Redirect to the custom error page ...