How would I set up the URL routing for a scenario such as this:
www.website.com/[project name]/News/Submit/[possible extra parameters]
[project name] = a variable that will be needed by the action to specify which project
News = Controller
Submit = Action
[possible extra parameters] = id
I have yet to run into any examples of how to a...
I'm trying to implement Steven Sanderson's WinsorControllerFactory from his pro Asp.Net MVC Framework book (great book, btw) and I'm stumbling into an issue. I'm not sure what else you'll need to know in order to formulate a response but I greatly appreciate any help in this. Thanks!
Here's the code:
WindsorControllerFactory
public cl...
I'd like to to provide data to a table in the views. The data is not only from database but also from a csv file.
Should I store the data in the ViewData, or should I store it in a object and pass it to views? What is the best approach, or any other methods I can use? Thx!
...
Hello together,
My first Question on Stackoverflow, I am new on the .NET MVC pattern and tried to call a Action using AJAX.BeginForm Helper Class in my Controller I return seralized JSON using return JSON();
In my view I Added a Scrip witch should consume the returnes JSON.
function ResultSet(request) {
var json = content.get_r...
hi,
if i wanted to add common functionality to all pages i create a BasePage and drive all ASPX pages from it, how can you do that to Pageviews and Controllers in MVC ?
thanks in advanced.
...
hi,
maybe this is a stupid question, but i have seen many Tuts that build JavaScript ode and HTML Tags from an HTML Helper Extension Method like creating a Jquery Menu or Tree, it looks so neat and saves cluttering in View and encourage re usability.
but i am wondering that because this code is generated on Server Side will it be slowe...
I have a class containing Linq To SQL objects that are used to populate drop downlists on a view. Using Scott Gu's Nerd Dinner I am implementing the validation framework they use, using partial classes. This works fine when working with one object for (example dinner) per view. But when I use a class that is not a Linq To Sql object, I c...
hi,
i use some HTTP Handlers from my Web Forms days forms, to for example Generate Images Thumbnails, Serving CSS, Etc...
i like them, htey are easy to make and offer great abstraction, so can i still use them with optimal performance in MVC or should i use Action Filters ?
thanks in advanced.
...
This is a general question about MVC as a pattern, but in this case I am using ASP.NET MVC.
I need to create an application whose output is an HTTP-accessed XML stream (content type text/xml).
I can do this using traditional ASP.NET using a Generic Handler object.
public void ProcessRequest(HttpContext context)
{
context.Response....
I am new to jQuery and cannot get a selector to work using the id of the element. The code below works:
$(function() {
/* $("#ShowBox").onclick = ShowAccessible; */
document.getElementById("ShowBox").onclick = ShowAccessible;
/* $(".searchcheck").click = ShowAccessible; */
});
function ShowAccessible() {
$("tr.hide")...
hi,
in Web Forms i used to create WeebServices and PageMethods to be able to call JSON results with jquery, so is this needed anymore with MVC ?
...
I know its possible to accept a list of objects as a parameter thanks to haacked but what about a list of Guids from checkboxes? This is a bit different as the only name you get has to be the ID.
Any help would be greatly appreciated, thanks!
...
I have an MVC application which has a set of fields for contact details to be added for a person (Email, Phone, Fax, AIM... etc). Initially I present a dropdown for type of input and and input field for the corresponding data, along with a link to add a further set of fields.
When complete I have a submit button to submit the form.
I...
I asked this question:
http://stackoverflow.com/questions/894865/is-asp-net-mvc-destined-to-replace-webforms/895400#895400
and a few answers were that if the website were public/Internet to use MVC, but if it were internal to use WebForms. I saw some of the reasons for it but some of them didn't really help me understand why this rati...
I need to set an EntityObject's EntityKey. I know its type and its id value. I don't want to query the database unnecessarily.
This works...
//
// POST: /Department/Edit/5
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(Guid id, Department Model)
{
Model.EntityKey = (from Department d in db.Department
...
Using ASP MVC and Entity Framework. In the view, you have a page declaration that specifies the model for this view will be a collection implementing IEnumerable. Let's say that collection holds Car objects, that are only from Ford (Ford being the Category).
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" I...
How do I create a dropdown in ASP.NET MVC that can handle a null value?
The application is a lookup field in a database, where the primary key is in a lookup table, i.e. Categories, and the foreign key is in another table, i.e. CategoryID, but CategoryID is OPTIONAL (i.e. it can contain a null).
I would imagine the generated markup in ...
From what I've read, information placed into TempData will be there for the current request and the next request (so that you can pass information across redirects). The problem is that if I browse to a controller action that does not redirect, the information in TempData will still be there for the next request. I'm using TempData to ...
Are there any differences, limitations or gotchas between NDjango and Django templates? I'm specifically interested in implementing them in future ASP.NET MVC projects.
I'm certain I won't be able to use any of my custom template tags that I've written for Django, but would I be able to port them to NDjango?
...
What materials do you recommend for an experienced ASP.NET to learn ASP.NET MVC?
...