I have been working on this problem for 2 days now and it's an easy problem and I just can't see the error in the code, even after comparing it with other projects where this works.
Could you help out?
I'm working on the account section of my website using ASP.NET Membership and the account controller class that is generated with ASP.N...
Hi,
If I do a post from jquery like so:
$.post("Row/getRowNames", { currRow: "MyRow", offset: 3 },
function(rowNames) {
/* How do I interpret the data to
},
"json");
How do I interpret the data rowNames that's passed back from the method in the controller? I need to turn the json result into an array of s...
I'm using Subsonic 2.2 Subcommander(Sonic.exe) to generate my DAL in a standalone class library with its own app.config.
I'm then referencing this dll assembly in my ASP.NET MVC webapp, and it compiles fine. When I try hitting a page I get "unrecognized configuration section"
Here's a screenshot of the error:
http://i41.tinypic.com/2h...
I'm starting to get into Unit Testing, Dependancy Injection and all that jazz while constructing my latest ASP.NET MVC project.
I'm to the point now where I would like to Unit Test my Controllers and I'm having difficulty figuring out how to appropriately do this without an IoC container.
Take for example a simple controller:
public c...
Hi. The question title might not be clear but what I want to do is something like this:
This is how I layer out my app
App.Domain
App.Services
App.Web
What I want is, if I request something like /api/OrderProcessor/GetAllOrder it will call method GetAllOrder in App.Services.OrderProcessorService.
The method will return an IL...
Hi
I am still having trouble understanding what interfaces are good for. I read a few tutorials and I still don't know what they really are for other then "they make your classes keep promises" and "they help with multiple inheritance".
Thats about it. I still don't know when I would even use an interface in a real work example or even...
If I have:
List<string> myList1;
List<string> myList2;
int placeToCheckValues = 0; //Used for breakpoints since the values don't get updated until after the line is executed
myList1 = getMeAList();
placeToCheckValues = 0; //Checked myList1 here, it contains 4 strings
myList2 = getMeAnotherList();
placeToCheckValues = 0; //Checke...
I just switch my website over to MVC from Webforms and I am using ajax very heavily. MVC seems to be slower but I haven't set up anything to record benchmarks.
Does anyone know which is faster for ajax handling and why it's faster?
...
Hi,
I have been evaluating Asp.Net MVC framework for past couple of weeks for our enterprise application. One thing what I am trying to achieve is Master-Details view. As it’s very clear that there is no viewstate and no postback. Now for instance, I am using Products, Customers, Orders and Order Details table from Northwind database...
Hi guys,
Yet another newbie with ASP.NET MVC! All I intend to do is for a search textbox on my page, if I type something and click search, the url to be redirected to should have the following at the end, like in stackoverflow,
/search?q=searchedtext
So here is what I have now,
<input id="searchText" maxlength="100" type="text"...
Hi,
While looking at the unit tests that come with the standard ASP.MVC Web Project template, I noticed that these do not test whether or not a proper HttpVerbs attribute is set on each action method.
It's very easy to test this with reflection, but the question is whether or not it It's worth the effort. Do you check HttpVerbs in you...
Hi Friends,
I am working on a website, where user can upload photos of product they want to advertise.
I am saving photos in a folder on the web. In the table where I keep reference of photos, there is a key field photoid which is Identity field(primary key).
My repository has following methods
Photo photo = rep.NewPhoto();
photo.Titl...
Hi, I cant find useful description on tracing asp.net, so i am asking here - How do I send an exception from Controller (or View) to trace.axd but nothing else?
...
I have a schema like so. Menu->Pages->PageRoles->ASPNetRoles
Menu has a CategoryID.
I want to return all Menu items with a CategoryID of 6.
Some Menu items have a foreigh key of PageID. Pages can have 1 or more roles against them. I can check the currently logged in users roles and make sure that they are in the results by joining the...
I'd like to implement ASP.Net MVC application which could have controllers, views and content files (like JS, images, ..) assembled dynamically. I'd have a base web project which would contain some basic controllers, views and other content files, but it should be possible to extend/replace all of these items.
The main reason for this...
In most samples I have seen on the web, DI in MVC Controllers is done like this
public ProductController(IProductRepository Rep)
{
this._rep = Rep;
}
A custom ControllerFactory is used and it utilizes the DI framework of choice and the repository is injected.
Why is the above considered better than
public ProuctController()
{
...
I have within my Sql Server 2008 database a trigger which will run on insert and update to populate a calendar table with dates calculated from the date info in the first table. (i.e. start date, end date, repeating sequence information).
I am using ASP.Net MVC using Linq to Sql to access the Database. My first view is collecting the da...
Possible Duplicate:
How to get current user in Asp.Net MVC
I've tried a bunch of different things, I know I've done it before when I used Webforms, but I can't seem to figure out how to do it in MVC.
Membership doesn't work
User gives me an IPrincipal or something User.Identity gives me the same type of variable...
Anyone know...
I have two action methods that are conflicting. Basically, I want to be able to get to the same view using two different routes, either by an item's ID or by the item's name and its parent's (items can have the same name across different parents). A search term can be used to filter the list.
For example...
Items/{action}/ParentName/...
I am wondering what the history behind the convention for a /contents folder in ASP.NET MVC project is; where it originates; and the reasoning behind it.
Our team is considering to move our /images and /styles out of /contents to decrease the folder levels in the project. It will be nice to know why the convention was in place in the fi...