Our first ASP.Net MVC/jQuery product is about to go to QA, and we're looking for a way for our QA guys to easily be able to simulate bad Ajax requests (without modifying the application code).
A typical integration/UI test plan might be:
Load page, click button "DoStuff"
"DoStuff" fails
Attempt button "DoStuff" again
"DoStuff" succe...
I see a lot of exampls of how to use StructureMap in a asp.net project like this:
StructureMapConfiguration.ForRequestedType<IResourceA>()
.TheDefaultIsConcreteType<ResourceB>()
.CacheBy(InstanceScope.Singleton);
Yet, in my Global.asax I can not access the StructureMapConfiguration object even when I import the StructureMap na...
So I'm about to start a new website from scratch and I've spent about a week trying to figure out what technology to go with. I'm sold on ASP NET MVC. I'm 100% sure I'm going to love using that. but what i am not so sure about yet is using Ling-to-SQL. So far I've gathered some data...
StackOverflow uses it - can't be that bad
can be ...
I need to set http header for disabling ie (7-8) caching (it disturbs my ajax functionallity).
I've tried inserting this code to the head of my site.master with no result -
<META HTTP-EQUIV="Pragma"
CONTENT="no-cache"> <META
HTTP-EQUIV="Expires" CONTENT="-1">
How and where can I set the HTTP headers?
or do you have a better solutio...
So this is another exporting to Excel question.
I have a page that has a table with formatting by stylesheet.
When I export the page by setting the ContentType to application/excel and Content-Disposition to attachment, I can export the table to Excel (not CSV). However, it loses all formatting. I think it's because Excel does not loa...
I want to do the following:
1: Add two dropdown list in the register.aspx [Say ddlRole,ddlGender]
2: Fill the dropdown list [ ddlRole should be filled from the database, and ddlRole should have two static field]
3: On submit I want to get the selected value of the two dropdown list.
Please help.
Thanks in advance.
...
Take the standard return statement for a controller:
return View("Index");
is there a way to make this thing compile time safe? using static reflection or some other trick?
...
We're using xVal and the standard DataAnnotationsValidationRunner described here to collect validation errors from our domain objects and view models in ASP.NET MVC. I'd like to have a way to have that validation runner identify when two properties don't match through the use of custom DataAnnotations.
Right now I'm forced into doing i...
Hello, I have an application that have EF 16 classes that share this information: They all are classes only with a key field and a description.
I think it should be a waste if I make a controller with just 1 method just to present a form to fill these classes info, then I was thinking in to make a generic form(with key, description) and ...
We have an internal ASP.NET MVC application that requires a logon. Log on works great and does what's expected. We have a session expiration of 15 minutes. After sitting on a single page for that period of time, the user has lost the session. If they attempt to refresh the current page or browse to another, they will get a log on page. W...
I am using an Ajax.ActionLink to call an Action in a Controller, nothing special there. I want to pass two parameters to the Action. Is this possible using an Ajax.ActionLink? I thought that it would just be a matter of including multiple values in the AjaxOptions:
<%= Ajax.ActionLink("Link Text",
"ActionName",
"ControllerNam...
I am creating an editor in asp.net MVC application using ckeditor. In textarea i have just written "Sample Text", but when i load the ckeditor and click on source button of ckeditor it gives me a lot of html like html > body > p > [Sample Text]. Why its creating extra html tags?? i have to send the content to database for saving html but...
When loading up a solution in VS2008 I get this message:
An error was encountered while opening
associated documents the last time
this solution was loaded. Document
load is being skipped during this
solution load in order to avoid that
error.
It shut down immediately the first time I opened it. The next time I opened it...
Publishing my entire application to a server in the U.S. every time I change a single line of code is taking FOREVER.
I'm running VisualSVN server on my production server. How can I auto-build my project (to a development site folder) on the server whenever a commit is made? And is this a good practice?
Update: I'm now looking into t...
I am looking to produce an MVC site which has complete control of the url structure using routing.
The specific requirements are:
www.mysite.com/ = homepage (home controller)
www.mysite.com/common/about = content page (common controller)
www.mysite.com/common/contact = content page (common controller)
www.mysite.com/john = twitter s...
I have a PhoneNumber class that stores a normalized string, and I've defined implicit operators for string <-> Phone to simplify treatment of the PhoneNumber as a string. I've also overridden the ToString() method to always return the cleaned version of the number (no hyphens or parentheses or spaces). In any views where I display the nu...
Just getting started with ASP.NET MVC and it's great! But I don't quit understand setting up routes.
How do I route ~/About to ~/Home/About?
/Views/Home/About.aspx
I would like to be able to access it with
/Home/About
or just
/About
...
Hi all
I've see a lot of MVC examples where domain-objects are passed directly to views, this will work fine if your view is simple.
The common alternative is to have a view-model which has all the same properties as your domain-model + any extra properties your view may need (such as 'confirmPassword').
Before doing too much reading a...
As I understand it, Domain Models are classes that only describe the data (aggregate roots). They are POCOs and do not reference outside libraries (nothing special).
View models on the other hand are classes that contain domain model objects as well as all the interface specific objects like SelectList. A ViewModel includes using Sy...
I am binding a Foreign key property in my model. I am passing a list of possible values for that property in my model. The model looks something like this:
public class UserModel
{
public bool Email { get; set; }
public bool Name { get; set; }
public RoleModel Role { get; set; }
public IList<RoleModel> Roles { get; set;...