mvc

MVC Downcasting to base class Strongly typed view

I have the following entity object: public class ForumPost { public virtual int ForumPostId { get; set; } public virtual int LoginId { get; set; } public virtual string Body { get; set; } ... Then I have a page that has a list of ForumPost(s) and and edit option, all on one page. I've created a CommentsVie...

MVC Ajax.BeginForm

I have an ajax form like so: <% using (Ajax.BeginForm("Comments", "Comments", null, new AjaxOptions {UpdateTargetId="main", OnSuccess="createSuccess" }, new{ @id="main"})) {%> <%: Html.ValidationSummary(true, "errors") %> <fieldset> <legend>Fields</legend> <div class="editor-label"> <%: Html.Lab...

Truncate ASP.NET MVC C#

I'm displaying some content using the following bit of code: <% foreach ( var m in ViewData.Model) { %> <div class="content"> <%= m.article %> </div> Which shows a news article from my database. What I want to do is truncate the story to be smaller, how do would I do this? Also the article column contains HTML tags such as <p> so the...

Portable View Engine Options (PHP / ASP.NET)

With MVC possible in both ASP.NET MVC and PHP (CodeIgniter, CakePHP etc) what are the options when it comes to using a view engine that could work with both platforms, enabling copy/paste without any changes? Ones I can think of are: NHaml / PHPHaml (not updated for 3 years though) / PHamlP I am assuming this works with CodeIgniter or...

Has anyone experienced an issue with IE8 displaying phantom form border in non-compatibility mode?

Hello SO: I am working on an ASP.NET MVC (framework v3.5) website, and this form page IE8 displays a border on top that looks to me like an empty element with a border floating on top of the form. Here are screen shots: I narrowed it down to the form, because after I removed the form generation code, the line ceased to display. As ...

asp.net mvc utilize view for rendering, without creating a controller action

I need to generate html (for the body of an email message) specific to a Customer object I thought of making a View that gets a Customer object and renders the appropriate text. Is there a way to call a view and get the rendered output without associating it to a controller action? Ideally in pseydocode I would do something like this ...

Java EE E-Commerce Frameworks

What are the Java EE frameworks for developing e-commerce applications? Thanks ...

displaying validationSummary message in div element in asp.net mvc 2.0

I am doing validations in registration page.My requirement is if ValidationSummary error message is generated i,e,ValidationSummary is become true then i have to display that ValidationSummary message in that div element.If error is not generated then that div element is not visible. So i have to check whether Validationummary is true t...

data submission during form submission.

i have a form which has two textboxes and a submit button. on entering data and submitting data gets stored in the database.but if i again refresh the page the same data again gets stored. How should this be prevented? ...

Lightweight Ruby MVC web development framework which plays nicely with ExtJS

I'm looking for a lightweight MVC Ruby framework for developing an ExtJS application. I started with Rails 3.0, but I feel that I'm struggling with the ActionPack (which I don't really need). Since all the UI (view) is done in ExtJS, I don't need any rendering support. What I do need is a routing infrastructure (for REST), session suppo...

Gridview in asp.net mvc2

I need to use ASP.Net gridview and do operations like sorting paging and selecting checkboxes in my asp.net mvc content view. I dont what to do. I've written something like this: <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server"> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate>...

Which Java web framework closely resembles ASP.NET MVC?

I need to port a ASP.NET MVC app to Java. To make migration easier, I would like to use the most similar Java web framework to ASP.NET MVC. I know basic Java web development [JSP/Servlets] but I don't any Java MVC framework. What Java web framework would make my migration the easiest? Any recommendations? ...

opensource javaEE project for learning

I have been learning javaEE and MVC pattern for a while from books and tutorials. but I wish to see how is coded a real world JavaEE projects. by real world project I mean a full application which is using by other people. maybe an opensource project like an e-commerce, a forum or a cms, I know many for php but none for javaEE. will be...

Is my use of MVC overcomplicating things and cuasing duplicate code?

I've wrote my own PHP MVC however i'm struggling to distinguish between the model and controller part. For example with a simple form that will add data to the database, the controller is pulling the form data from a request object, and passing it to the Model to handle the actual database insert. However there seems a lot of somewhat du...

Use Mvc 2 with ninject 2 and NHibernate - Get SessionFactory

Hey I'm trying to combine Mvc2 with Ninject and NHibernate, and found a guide here: http://damianm.com/tech/nhibernate-mvc-and-ninject/ The problem is that he use Ninject 1. So i have to convert it, and I'm almost succesfull, but i still got one problem: Im not sure how to convert the "context.Kernel.Get" here: protected override ISe...