I am very new to MVC and LINQ.And have some questions.
I have a table named users where I am storing "M" or "F" for male and female.There is another table called Genders Which is linked to the Users table.I have Users Model in ASP.NET MVC application.My question is when I show data where should I create a property to convert that "M" to...
Hello I have always been thinking which is the best way of writing html in an MVC architecture.Would it be regular html as <div id="id1"> <input type="text" name="tBox" /></div> or echo '<div id="id1"> <input type="text" name="tBox" /></div>';. This is a very small example, but sometimes we can have a single variable or single echo state...
I have a MVC 2 web application that will have a high volume of users. One page in particular will be rendered based on XML from a database table. I was hoping to use de-serialization to parse the XML into an object tree for easier access to the data. However I'm not so sure that this will perform well enough for my users. Is there any ot...
Hi All,
I have a small form with a single textbox and a submit button.
using (Html.BeginForm("Index", "Tag", FormMethod.Post)
In my tag controller i have a method that looks like:
public ActionResult Index(string tagText)
I'm trying to figure out first how to route this so the resulting URL will look like:
http://mydomain.com/Tag...
Hello,
I need to recursively iterate over an array in a view and was wondering what are some best practices for this type of situation? I'm trying to avoid building my desired html output in the controller or model.
FYI I'm using the framework codeigniter.
Thanks for the help!
...
I'm building a site with CakePHP, but this question is more about solving an MVC problem than it is a CakePHP problem.
I have a User Model and a Group Model. This is a HABTM relationship, so different users may belong to multiple groups. One controller on my website handles the blog. It has many methods, but all of the views share a ...
I am trying to create a actionUrl using the following code
<portlet:actionURL var="actionUrl"><portlet:param name='action' value='viewModules' /></portlet:actionURL>
and map that onto a spring controller
However the controller does not respond as the generated url's ampersands are encoded
e.g.
<snip>&p_p_lifecycle=1&p_p...
If I had something like this:
Where would each class go? Does anyone have any links to good examples of MVC?
...
I'm planning on taking mcts 70-515 exam. where do I start?
are any of these things good/proven to work?
http://www.exampapers.me/best-70-515-test-paper-23563.htm
has anyone use these before?
any input greatly appreciated. thanks
...
During Zend_Controller_Action::init(), is there a way to cancel the action (so it won't be called)?
<?php
class JsonApiController extends Zend_Controller_Action {
function init()
{
// try JSON decoding the raw request body
if ($jsonDecodingFailed) {
echo '{"error":"invalid JSON"}';
$this->...
Hi All,
In a couple of weeks, working on and off, I've managed to create the app that I had envisaged. It has the functions I want, and the performance is not too bad. However, if I look at my code it clearly has been put together without proper MVC consideration, and I know it's gonna bite me in the butt if I try scale the app or reuse...
I've just started using Zend Framework and Doctrine as its ORM, and I have some doubts regarding the model. It's obvious that the purpose of the ORM is just to map my domain model to database model, but I'm curious how you would model various reports needed on a Web application?
From my point of view, and correct me if I'm wrong, I shou...
The default stack has the parms interceptor who binds the parameters to the setters found in the action who is being invoked. That works fine when you know the name of the parameter. For example if a request parameter is "employee.name" that could be binded to a property of my action which has a property "employee" with a property "name"...
I'm using Zend Framework and the URL View Helper to create URLs
I have some lines like this in my navigation:
$this->url(array('controller' => 'index', 'action' => 'index'))
$this->url(array('controller' => 'who', 'action' => 'view', 'id' => $row->who_id));
$this->url(array('controller' => 'projects', 'action' => 'view', 'id' => $row->...
When you're making a web app, you frequently need different things to happen at a given URL for HTTP POST requests than happen for HTTP GET requests. I am making a web app in Pylons, and I'm encountering this question.
Is it better to distinguish between POST and GET in my URL dispatcher (Routes) or in my controllers? What factors wou...
I am using JQuery ajax in Spring MVC 3. When making the following call, I am running into a dilemma with myurl. On the local development machine, myurl would be localhost:8080/myapp/my_json_controller. On the production, my url would be domain/my_json_controller. I tried using relative url, /my_json_controller, and it would not work ...
Hi,
I have this url working in my code:
http://localhost:12345/home/index/<parameter1>/<parameter2>/<parameter3>/<parameter4>
I want to change my url to NOT to include the home/index (<controller>/<action>).
My current Global.asax entry is like:
routes.MapRoute(
"Default", // Route name
"{controller}/{...
Hi Friends,
I am working with Social Engine which is based on Zend Framework and Smarty Templates.
I need to make custom functionality for profile page, where I need Ajax based Dynamic Country / State / City selections like
Dropdown for Country -> on selection of some country, State will display belonging to selected country and Stat...
I have the followning tables:
Users
Organizations
Email_Addresses
Email_Address_Relations
Both Users and Organizations may have email addresses, which are stored in the Email_Addresses table and related to via the Email_Address_Relations table.
Structure of Email_Address_Relations
id char(36) NOT NULL
module varchar(64) NOT NULL DE...
Hi
I am developing a new version of my Joomla component TTVideo. I'm trying setup a rating system using the jQuery stars plugin. I have the jQuery noconflict issue resolved, however I'm a bit confused as to how to send the vote securely to a helper class that updates the database with the value of the vote.
Usually this is done throug...