Hi everybody,
I have an ecommerce working in ASP.Net MVC. i'm using Caching to improve more performace in my pages and it's working fine.
I'd link to know what is more performative, for example, I can set OutPutCache in my views and and use this cache for all page OR I could get my List of Products in controller, put it on cache (lik...
So I am compressing my output stream via an action filter:
var response = filterContext.HttpContext.Response;
response.Filter = new DeflateStream(response.Filter), CompressionMode.Compress);
Which works great. Now, I would also like to remove the excess whitespace present. I found Mads Kristensen's http module http://madskristensen.ne...
I'm preparing a presentation about ASP.NET MVC and I'm searching for sites that use ASP.NET MVC in production.
The only site I know that makes use of ASP.NET MVC is stackoverflow :)
Any others?
...
Hi All,
The problem: client needs a website to serve 10+ customers, each customer has 5-10 people they wish to grant access using login & user name, once "logged in" the user can download files specific to their company.
The files will be uploaded to a directory under the customer name, and displayed as a list. Currently using membersh...
I got a bit of an issue in my ASP.NET MVC project.
I have a chat div in the bottom right corner (like facebook), and of course I do not want this to reload when navigating to all my navigation is ajax.
The problem I am facing is that I use the following code on the top of the view page:
<script type="text/javascript">
$(document).rea...
<div id="4591" >
<input type="text" id="Title1" name="Title1" value="a" />
<input type="submit" name="button" value="Save" /> </div>
<div id="4592" >
<input type="text" id="Title2" name="Title2" value="a" />
<input type="submit" name="button" value="Save" /> </div>
<div id="4593" >...
I've implemented the following classes to validate data
public abstract class Validated
{
public bool IsValid { get { return (GetRuleViolations().Count() == 0); } }
public abstract IEnumerable<RuleViolation> GetRuleViolations();
}
public partial class User: Validated
{
public override IEnumerable<RuleViolation> GetRuleViol...
My solution is split into 3 projects. Model, Services and Web. In my Service project, I'd like to use some F# features in it. Whats the best way to use 2 separate service projects, one for C# and one for F# and how would I structure these projects?
...
I have a class User and a class History. History has 'User' property, and User has 'Histories' property. So there's a database relationship.
But when I create a new User history class and set UserID property, I can't access the 'User' property.
var history = new History { UserID = 1 };
// history.User = null ???
How can I get the use...
Hello,
I am new to MVC, and so am working through the NerdDinner tutorial, here. In particular, I'm running into problems with the use of the UpdateModel method, which is explained in the part five of that tutorial. The problem is, when I try to edit the value of a dinner object using the UpdateModel method, the values do not get update...
I'm fairly new to using the OutputCache attribute in ASP.NET MVC.
Static Pages
I've enabled it on static pages on my site with code such as the following:
[OutputCache(Duration = 7200, VaryByParam = "None")]
public class HomeController : Controller
{
public ActionResult Index()
{
//...
If I understand correctly, I...
I'm using the module-level validator: 'PropertiesMustMatch' on my view-model, like so:
[PropertiesMustMatch("Password", "PasswordConfirm")]
public class HomeIndex
{
[Required]
public string Name { get; set; }
public string Password { get; set; }
public string PasswordConfirm { get; set; }
}
I'm noticing that if I sub...
I added a route into my site to allow for a sitemap and everything worked fine in IIS7 but once I deployed the route stopped working. Since the live server is running IIS6 I needed to put a new mapping in for .xml to be processed by .net and then it started to work.
My issue though is on every other xml file on the site now. I keep gett...
hi there. have looked at Phil Haacks project on books at
http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx
which has been useful, but I have a mix of data types.
I use a modelview so that i can have a mix of objects, in this case: Order (ie order.id, order.date etc), Customer, SoilSamplingOrder and a list of SoilSam...
Hi there.
I need to take the results of a query:
var query = from m in db.SoilSamplingSubJobs where m.order_id == id select m;
and prepare as an ICollection so that I can have something like
ICollection<SoilSamplingSubJob> subjobs
at the moment I create a list, which isnt appropriate to my needs:
query.ToList();
what do I do...
I was thinking about switching one of my projects (and after that subsequently other projects too) to Spark View Engine but after todays research I ran into problem of a lack of Intellisense for Visual studio 2010. Not only that but it seems that the project is not maintained regularly.
So I'm left with a feeling that I should not choos...
Hello,
I am writing an ASP.NET MVC 2.0 application which requires users to log in before placing a bid on an item. I am using an actionfilter to ensure that the user is logged in and, if not, send them to a login page and set the return url. Below is the code i use in my action filter.
if (!filterContext.HttpContext.User.Identity.IsAuth...
I know this question has been done to death but none that I've found here answer the question.
I have the following code in my controller;
SmtpClient smtpClient = new SmtpClient();
try
{
smtpClient.Host = "smtpout.secureserver.net";
smtpClient.Port = 25;
smtpClient.Timeout = 1...
I've recently reached the stage where an ASP.net MVC application I am developing is ready to be deployed to the production server. I've worked out how to publish the application - I've got all the files on the server, and can access them over the internet.
However, I can't work out how to deploy my database. The server has the SQL Ser...
I have a very popular site in ASP.NET MVC/SQL Server, and unfortunately a lot of deadlocks occur. While I'm trying to figure out why they occur via the SQL profiler, I wonder how I can change the default behavior of SQL Server when doing the deadlocks.
Is it possible to re-run the transaction(s) that caused problems instead of showing t...