Below is the short version of my code, it's very basic. In my page model, I have an enumerable field that I'm passing into an Action() method. The problem is, right before Html.Action() is invoked in the view, it's NOT null. However, once it's inside the child action, it's suddenly null - as if it's not being passed in.
On a similar at...
Hello Good people
i'm trying to check whether my forms(Zend_Form) are being well processed and display whatever back to user, for testing (my way of learning new stuffs).So i've read online that there are 3 ways to accomplish this. one using the Zend_Registry which is unanimously said to be a bad practice.i'm now left with placeholder a...
Example is fake.
ASP.NET MVC: I have a view that renders a student info. Student info consists of First Name, Last Name and (optional) Age (declared as int?).
Student info is rendered something like, if age is not specified I want to show "not specified":
<span><%= Model.Student.FirstName %></span>
<span><%= Model.Student.LastName %><...
Hi All, Currently I have a pure silverlight website with navigation. Im worried about the customers that are hitting the website and are leaving straight away because they are have to have the SL plugin installed and they also have to wait for the 1.5 meg xap file to download.
The first page of the silverlight application is the login/r...
I have a webapp written in PHP using a MySQL database backend. This question could just as easily apply to any language and application trying to use an SQL database and MVC OOP design.
How do you keep your SQL code restricted to the Model?
There's a rather longer story specific to my case behind the question. As previously mentioned ...
Hi,
I couldn't find any documentation about this around so please help.
I need to localize my web site URLs like the samples below;
website.com/home/about
website.com/anasayfa/hakkinda
also action names will have to be localized as page names;
website.com/AdList/12/Details
website.com/IlanListesi/12/Detaylar
As you see it seem...
Say I want something like this in Rails:
class Proposal < ActiveRecord::Base
def interest_level
self.yes_votes.count - self.no_votes.count
end
private
def yes_votes
self.votes.where(:vote => true)
end
def no_votes
self.votes.where(:vote => false)
end
end
What have I basically done w...
I am tasked to rebuild four e-learning web applications (PHP MVC) that deal with companies and users that buy/sell and interact with online courses:
The "overlord" application, where company accounts are created, reports are aggregated for all the accounts throughout all the other applications, etc.
The "enterprise" application, where ...
Hi - I would like to return an image as an ActionResult from an MVC2 controller. This image is a 1x1 white pixel (for a tracking application). I do not want to reference an image on the disk or in a database. I would like to generate the image in my method and then return it from the controller action.
Any one know how to generate a ...
So this seems like it should be simple. I'd like to set a public model property from javascript that's fired on the mouseover of an image.
So something like this:
Html:
...img src="<%=Model.AppDetails.Logo%>" onmouseover="showMenu(this);...
Javascript:
function showMenu(app) {
<%Model.CurrentId = app.id%> //app.id is of course u...
In my model I have relationships like this:
[Person]
PersonId (PK)
...
[Orders]
OrderId (PK)
PersonId (FK to Person.PersonId)
...
A person can have multiple orders.
I generated PersonController with Create/Details/List/Edit views. I want to be able to manipulate Orders also, but within the context of a Person. In other words, I...
I'm using xVal and jQuery for clientside form validation in MVC.
A date field annotated with [DataType(DataType.Date, ErrorMessage=...)] is being properly validated if the user types a string that does not fit into the designated format. But if the user types something with invalid month or day, e.g., 13/32/2010, it is not validate unti...
Hello,
I am getting a bit confused about how an N Layered MVC application should look. I am thinking as standard there should be:
ASP .NET MVC Project
Service Layer
Data Access Layer (containing repositories)
I am confused as to where the entity framework model should sit (.edmx). Should it be in the Data Access Layer? Should any par...
I'm very new to PHP on TRAX and the site's doc(s) aren't that great... How do i pass a var (say $monthago) to the view?
...
The default scaffolded views generated by ASP.NET MVC 2 contain links such as:
<%: Html.ActionLink("Back to List", "Index") %>
<%: Html.ActionLink("Create New", "Create") %>
These links are perfect if I came to this page from that same root. But for example, if I have Orders and Persons and I navigate to /Orders/Edit/17 via /Persons/O...
Can you help me fix the exception/error message handling in my control architecture script?
First, let me post the actual script...
Note: some of the code's indentation is a bit off, but I am uncertain how to fix it. I apologize.
class FrontController extends ActionController {
//Declaring variable(s)
private static $instance;
pro...
I have a ascx file (with its own viewmodel) that displays a table. Each row in the table will have a user control (with their own ViewModel - created from the ascx viewmodel).
The main problem is with validation.
The individual user controls on each row use DataAnnotation validation with a Validation summary at the top of it, when runni...
I am solving a kind of architectural problem inside CI.
I need to be able to instantiate other controllers and their methods in main controller.
E.g.
*main.php/function index():*
$controller2 = new Controller2();
$data['pre_loaded_data'] = $controller2 ->ajax_get_some_view(array('static'=>true));
The goal behind this approach is to bu...
I see the term often used as if there is a concrete distinction between the two when discussing MVC for OO languages. From what I get from context it is that business models perform an action to mutate the data models. Is that a correct way to express the difference.
I guess what confuses me though is that most examples of models mix bo...
No ORM. All I know is that I have PHP 5+ and adodb. From those two, how can I use MVC? I cannot use other frameworks and I"m not asking that someone build be anything from scratch (I want to learn!). But how would I start off here? I know how to mix things incorrectly classic asp style. What I don't know how to do, on a very very ba...