asp.net-mvc

Rhino UnitOfWorkApplication + Castle Automatic Transaction Management application does not flush automatically on request end

I'm building ASP.Net MVC aplication based on UnitOfWorkApplication and I'd like to use Castle ATM facility. At the moment I've problem with flushing the session on request end. My service class (which is called in my controller action method) looks like this: [Transactional] public class UserAdminService : IUserAdminService { [Transac...

how to exclude another attribute in this syntext [Bind(Exclude = "ID")] in MVC.

as I've excluded "ID", how can i exclude another attribute? ...

Host Multiple Domains with the same ASP.NET MVC app?

I want to host multiple web sites (all with different domains - not sub domains) with the same ASP.NET MVC app. I need the app to act differently based off the domain, but I still want the same app to serve all domains. I don't want domain forwarding or redirection, I actully want all the domains to function on their own, but served ou...

How do I install an ASP.Net MVC application on IIS 7 using Wix?

For IIS6 I can use the IIS helpers in Wix to install a web application like this: <iis:WebAppPool Id="AP_MyApp" Name="My Application Pool" Identity="networkService" /> <iis:WebApplication Id="WA_MyApp" Name="MyApp" WebAppPool="AP_MyApp"> <iis:WebApplicationExtension CheckPath="no" Execut...

How to check null value in MVC view?

Hi, I am using MVC with LINQ-to-SQL class. as foreign key can be null, i have one record having f.k. null and others are having values. now i am displaying it in view by Index view. In index view i am resolving f.k. by writing code like <%= Html.Encode(item.UserModified.UserName) %> Now i have a problem in view that "object refere...

How do I get static expression ActionLinks etc in ASP.NET MVC 1?

I've read loads of examples in which <li><%= Html.ActionLink("Home", "Index", "Home")%></li> is rewritten as <li><%= Html.ActionLink<HomeController>(c => c.Index(), "Index")%></li> However, with a fresh ASP MVC project, this doesn't compile. I've read its something to do with needing to add the ASP MVC Futures assembly. Is this c...

ASP.NET MVC: How to create an action filter to output JSON?

My second day with ASP.NET MVC and my first request for code on SO (yep, taking a short cut). I am looking for a way to create a filter that intercepts the current output from an Action and instead outputs JSON (I know of alternate approaches but this is to help me understand filters). I want to ignore any views associated with the acti...

Structure map InstanceScope.Hybrid with asp.net mvc misbehaves

I'm really stuck here. I have a asp.net mvc application and use StructureMap 2.5.3 (SM) to inject service and repository classes in my controllers. All controller are made by a SM factory. I also have a Linq to SQL datacontext which I wanted to cache by hybrid. public class DBRegistry:Registry { public DBRegistry() { ...

asp.net mvc wizard form with xval

im using linqtosql and xval to validate server side and client side. im trying to do a wizard style form but cant pass the actual values accross different actions. any ideas? ...

Is Absolute positioning a best practice or should I avoid it?

I am watching the ASP.NET learn video on http://www.asp.net/learn/3.5-videos/video-13.aspx and it is showing you can place controls on a page using Absolute positioning. I am just wondering if this is a best practice or should I avoid Absolute positioning? It seems like a nice, easy feature, but there must be some reason why it is not ...

ASP.NET MVC View - Problem with FCKEditor

Hi, I got another problem with the FCKEditor within ASP.NET MVC. Please review the code below <script type="text/javascript"> var sBasePath = 'http://localhost:2170/Content/fckeditor/'; var oFCKeditor = new FCKeditor('FCKeditor1'); oFCKeditor.BasePath = sBasePath; oFCKeditor.Height = 300...

a simple .net website source control system?

I work in Visual Studio working on sites mostly myself and occasionally I start on new features for a site and bam a bug pops up on the live site and now I am in the middle of changes and can't post a fix to the bug until everything I started to change is complete. So I am looking for a nice an simple way to work with this type of situa...

Submitting a form to proper action using ASP.NET and MVC

I have a simple form that is used to update an entity in my ASP.NET MVC app. I want the user to be able to submit the form, have the proper Action on my controller be called and then notify the user that the update was completed. Because I wanted to display a JQuery dialog after the user clicks the update button, I wanted to use JQuery ...

Does Html.ActionLink() post the form data?

Hi a want form data to be availble in another action of same controller. is it possible ? or is there any other way? ...

Search engine, asp.net mvc, Domain Driven Design

Going to develop a search engine. I'm wondering how my DDD should look. Sorting records should be implemented, but i don't want that my views knew about my database structure (by which columns to sort). As far as i understand - sorting information should come from infrastructure layer, from repository implementation, so there have to be...

How to organize views and controllers hierarchically when having model with many children

Lets say I've a website that lists Persons, and each Person has multiple properties, some one-to-one (name, address), some one-to-many (favorite colors, bank-accounts etc). In my business layer it's nicely hierarchically organized. How do I organize this is my controllers and views? Should I have a PersonsController, FavoriteColorsCon...

How to change the style properties of HTML.Label ?

I am using MVC in asp.net. i want to change font size & color of html.label control. so how can i make helper class of this? ...

How do I dynamically add and remove line items from an ASP.NET MVC view?

I have a PurchaseOrder model: public class PurchaseOrder { public string OrderNumber { get; set; } public string Customer { get; set; } public IList<LineItem> Lines { get; set; } } and a LineItem class: public class LineItem { public string PartNumber { get; set; } public int Quantity { get; set; } } What I ...

Why does adding the @ symbol make this work?

I am working with asp.net mvc and creating a form. I want to add a class attribute to the form tag. I found an example here of adding a enctype attribute and tried to swap out with class. I got a compile error when accessing the view. I then found an example of someone adding a @ symbol to the beginning of the property name and that wo...

Why are my text fields getting wiped out?

I've got a partial that is called by Ajax to add new line items. If I type in some data in the part ID field then click the link to Add another item, it wipes out what I just typed. View: <label>Parts Used <%= Ajax.ActionLink("Add another item", "BlankEditor", new AjaxOptions { UpdateTargetId = "partusageitems", InsertionMode = In...