Hello all,
I have all my text inside view coding. I preffer to save it in app_resources, because i would to add other languages in future, and its look quite cleaner.
I just know that I need to use metatags in my view for text to connect it with file app_resource. How to it correctly, could you show me some examples how it looks like ...
I'm developing a system using WPF 4. I pretend to use MVC in development.
I never used MVC before, so I'm a little confused about concepts. Some time (ages) ago I develop some Delphi software more or less with that scheme:
a thin client application to be installed in several machines that talk with the...
...server application that ta...
I'm using the term "partial" to refer to a small section of presentational code which is repeated on many views. For example, a sidebar. In vanilla PHP, where the business and presentation logic is mixed, including a sidebar is no trouble:
if($someCondition) {
include('sidebar.php');
}
However, in an MVC design pattern, the presen...
I have a WCF REST service built with C# and it returns an image as part of a CPU intensive operation. The client is running on Android (Java) By default, it will return a text JSON object that looks something like this:
{"d",[9,0,77,12,11,...]}
Those are they bytes of the image. Fine. However, all the solutions for decoding this JSON...
Hello, I've recently became interested in proper OOP design in web applications. I think I understand most of the principles and design patterns but sometimes I have problem with putting them into practice.
I use MVC and I think I am able to design controllers and views in OOP way. The problem I face is with models. I'm particularly obs...
Hello.
I have recently started using the CodeIgniter framework for my PHP development.
I was just curious as to correct usage.
Essentially I have the following situation.
I have a controller entitled 'items'
I want it so if the user goes to items/index they get a list of caetgories, if they go to items/category-name they get a list ...
I do not like having Controller-related code (understand ICommand stuff) in my ViewModel in WPF. Is there a framework to separate it and getting back to good old MVC for WPF?
I would like to get :
- a view in XAML
- a view model
- a model
- command handlers
...
I'm trying to create an input text through the following code so it can hold a date that user can choose in a date-picker jQuery control:
<%: Html.TextBox("date", null, new {class = "date-pick"}) %>
<input name="date" id="date" class="date-pick" />
Problem is, I need to specify the "class" attribute for the input text, but...
I'm trying to include a partial in a view. Both the partial and the view are in an MVC Portable Area. Here's the code in the view:
<% Html.RenderPartial("Here"); %>
Here's the partial (named Here.ascx and located in the Shared folder of my portable area):
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" ...
I am trying to create a very basic MVC framework to better understand the pattern.
I am having trouble understanding the URL routing part.
So far i've understood that the url carries 3 basic pieces of information in this format:
www.site.com/controller/method/querystring
So given the following URL:
www.site.com/user/delete/john
'user...
Hello,
I want to take the export of my telerik grid data.
My question is from that page:So please See the url:
http://www.telerik.com/support/kb/aspnet-mvc/grid/export-to-excel.aspx
At the above url page I found the way to export the grid data, but one thing which is not make me clear is that in controller the action
Export(int page...
Hi,
On this page it generates a Excel sheet and allows user to download that.
But as shown below it does not work properly on IE (both 7 & 8)
this works fine with Firefox,chrome and safari.
Is there any settings we can do on both client side or Server side.
image location
thank you
...
I am currently writing some unit tests for an ASP.NET MVC 2 controller and having some issues with the MVC 2.0 validation attributes. The validation attribute in question uses a repository to check that no duplicate names exist in the current data source, and I would like to replace this repository with a fake one during my unit test. I ...
What is the difference between viewstate and viewdata in mvc?
...
Hi,
I'm pretty new to MVC and just read an article about helpers. Now I have this code on the View:
<div class="display-label">Ingredients:
<% foreach (var e in Model.Products_Ingredients)
{%>
<%: e.Ingredient.Name%><br />
<%: e.Percentage%>
<%if (e.Percentage != null)
...
I am using ASP.NET MVC in C#
I have a page where the user can move different Widgets around the page, and I now need a method to save the state of the widgets. I am using jQuery in the HTML page, and the jQuery posts the new page layout using JSON. I am unsure how to read the JSON in the controller.
The code I'm using is based on this...
I need an example on how to operate on nested models.
Let's assume, we have some order management application and models: Order, Position, Item.
Order can contain Positions and Positions can contain Items.
The question is: how to handle data selection?
Some use cases that is needed:
Get list of Orders with Positions and
Items (like...
Hi all, I'm trying to keep the values of checkboxes in a form with the same name (level and coursetype) in the querystring so I can check which ones were selected. In the first submit, I get:
Search?coursetype=1416&coursetype=post16&level=3&level=6&level=1
which is fine so I can check the values back into the view and tick the ones pr...
I have a Service model with title:string description:string date:datetime. I would like to implement a system to create multiple services based on date patterns, e.g. when the user create a new service for Oct 20 he can choose to "repeat" it once a month for 5 months. The final result should be that 6 services are created, due to Oct 20,...
I have a folder structure like this and I'm trying to load the News model inside my controller:
<?php
/**
* Login
*/
class Admin_NewsController extends Zend_Controller_Action {
public function preDispatch() {
$layout = Zend_Layout::getMvcInstance();
$layout->setLayout('admin');
}
public function init() {
...