mvc

How to get particular column distinct in LINQ to SQL

I am having columns as category and songs in my table for each category. There are almost 10 songs and in total there are 7 categories such that it is tabled as category1 songCategory1a category1 songCategory1b category1 songCategory1c --- --- -- category2 songCategory2a category2 songCategory2b category2 songCategory2c --- --- --- cate...

Asp.net Mvc configurable Html.ActionLink controller/method

Hello everybody, I have ascx partial view with html-layout like that <%=Html.ActionLink<PersonController>(x => x.Publications(param1, param2, ... )) %> My ascx is pretty big & I'd like to reuse it, changing controller/method in Html.ActionLink with another controller/method. Method of another controller has the same signature as Per...

flex mvc architecture

hii. im just beginer in flex development. I wish to do projects in mvc pattern. Have any tutorial or web sites to study flex using mvc. ?? ...

why MVC instead of good old asp.net? Still not grasping why I should go this route??

I know this question has been asked before and I read all the answers but they still don't give me the answers I am looking for. I need something concrete. I volunteered to give a presentation on MVC to other developers in our group which forces me to learn it. The big question everyone has is: "What can MVC bring to the table that we...

PHP: MVC and DRY

Hello! Question about controllers. Can controller call it`s own class methods inside an action? EDIT: Oh sorry. I meant I dont want to repeat myself. :) ...

mvc presentation model best-practices

Hello, everybody How do you usually convert business objects to presentation? For example: Business object Person { Id, FirstName, LastName, Patronymic ... } should be presented as "LastName F. P. " in html layout. We use Presentation classes hierarchy to represent data ready for output from Business model. Questions: Will you k...

Using Data Annotations on POCO's with MVC for Remote Validation

Hi All, I am developing an ASP.NET MVC app and I've been looking into using Data Annotations on my POCO's which are defined in my Service Layer. As long as I have a reference to System.ComponentModel & System.ComponentModel.DataAnnotations this is no problem and what I like about this is that it allows me to reuse my Service Layer in a ...

asp.net mvc 2 multiple partial view

Hey Guys, I have a contoller that renders 3 different views. But I also have a common part (div) for every view. I thought that I can create an UserControl with own controller and include that control on my views (New controller and view as controll). How should I use that UserControl? Should it be a partial view? Or different approach...

Guide need to build a JSP based webapplication

I want do a web-application that consists of the following pages: Main, Inventory, Shopping, Login, and Report. All will be JSPs and all will be called using the MVC pattern where one of two servlets uses the RequestDispatcher to call the appropriate JSP. This uses server-side forwarding and not redirection. I have ER diagram: http://ti...

View artifacts leaking into the model of MVC

In an ASP.NET MVC application (which has very little chance of having its view technology ported to something non-HTML, but whose functional requirements evolve weekly,) how much HTML should ideally be allowed to be directly represented in the Model? I might come across as a design bigot for this, but I regard it as bad practice to allo...

Get selected value of dropdownlist in asp.net MVC

how can i get select value of dropdownlist and here is my code which is working fine. var list = new[] { new Person { Id = 1, Name = "Name1" }, new Person { Id = 2, Name = "Name2" }, new Person { Id = 3, Name = "Name3" } }; var selectList = new SelectList(list, "Id", "Name", 2); ViewData["People"] = selectList; <...

Serial Number For Telerik Grid in MVC

I need to add a column to telerik grid which shows the serials number Please Help.. Thanks ...

protected access specifiers in singleton class

HI, In singleton class we are declaring constructors as private. Is it possible to give as protected. If giving as protected is it beneficial. Whats the advantage or disadvantage of private over protected ...

Which JavaScript MVC framework to use for wysiwyg editing and floating context-sensitive settings panel?

I'm developing a cms that allows editing everything on the page (generated server-side with a template engine) by just clicking on it — the area turns into input field, textarea or a full-featured tinyMCE editor, Template defines editable elements like "page heading", "copyright footer text", "image", "rich text block" etc. Along with ...

What's the correct way to instantiate an IRepository class from the Controller?

I have the following project layout: MVC UI |...CustomerController (ICustomerRepository - how do I instantiate this?) Data Model |...ICustomerRepository DAL (Separate Data access layer, references Data Model to get the IxRepositories) |...CustomerRepository (inherits ICustomerRepository) What's the correct way to say ICustomerReposi...

What is an example of MVC in PHP?

I'm trying to understand the MVC pattern. Here's what I think MV is: Model: <?php if($a == 2){ $variable = 'two'; } else{ $variable = 'not two'; } $this->output->addContent($variable); $this->output->displayContent(); ?> View: <?php class output{ private $content; public function addContent($var){ $thi...

JQuery Menu plugins under ASP.NET MVC seem to only work in Chrome, but not in IE & FireFox

Recently, I was trying to prototype some jQuery-based menu into ASP.NET MVC. Just to name two examples here: plugins.jquery.com/project/columnview www.filamentgroup.com/lab/jquery_ipod_style_and_flyout_menus/ Their demo page looks great, but when I integrate their sample code into MVC, the script no longer works in IE and FireFox, b...

understanding the ORM models in MVC

i cant fully understand the ORM models in MVC. so i am using symfony with doctrine. the doctrine models are created. does this mean that i don't have to create any models? are the doctrine models the only models i need? where should i put the code that uses the doctrine models: eg. $phoneIds = array(); $phone1 = new Phonenumber(); ...

How union is used to define a class

Hi, I have two doubts, please help me on this: Is it possible to define a class inside union Is it possible to define a class without class name ...

please explain the dataflow in MVC specially in codeigniter

Dear friends, Can anyone please explain me the object flow in codeigniter MVC ? I can see for example when I put the followong code in controller it works, but i am not being able to figure out which part of this goes in model in vews. I tried several ways but coudn't. When i use the example codes from other it works but myself i am get...