I've been using Yahoo's YSLOW to try and make my pages go faster at AgentX
I am using the below compress filter. When I run the site through visual studio YSLOW says that all the files are compressed and I get an A when I view the live site it gets an E and says my files need to be gzipped. Can anyone explain?
public class Compre...
For some reason when I run my project locally, everything works just fine. When I publish my site live to my shared hosting server, the actionlink causes links to come out as
http// www.mydomain.com/MySolutionName/Account.aspx/LogOn
when it should be
http// www.mydomain.com/Account.aspx/LogOn
Any ideas?
...
For some strange reasons, i want to write html directly into output stream from Action Method.
( I understand MVC sepearation, but this is a special case. )
Can i write directly into httpresponse output stream ? In that case, which IView object, the Action Method should return ? Can i return 'null' ?
...
Hi everyone,
Wanted to know which open source projects (eg blog engine.net, etc) is good to explore/read its source code.
The main purpose is to help a beginner asp.net/c# developer learn about how to code the presentation/business/data layers cleanly.
One ASP.NET for Webforms. Maybe another for ASP.NET MVC. Preferably for .NET ...
I have some action methods behind an Authorize like:
[AcceptVerbs(HttpVerbs.Post), Authorize]
public ActionResult Create(int siteId, Comment comment) {
The problem I have is that I'm sending a request through AJAX to Comment/Create with
X-Requested-With=XMLHttpRequest
which helps identify the request as AJAX. When the user is not l...
I'm trying to find a good way to handle the following scenario (I'm still kinda new to this):
A user can register through my site using an RPX/OpenId provider.
Step 1: The user authenticates through a provider. The provider returns a temporary token to one of my action methods.
Step 2: I use the token to grab the user's profile inform...
In my current asp.net mvc project a user should be able to log in. When logged in a set of preferences can optionally be set. Some of those preferences are general (e.g. prefered site language etc), but some are specific to this project only (pre-defined query filtering etc).
Since these preferences are present in a lot of different pla...
I have not used MVC but am merely wondering as a Java person, hence the q.
...
I'm look at learning a bit more ASP.Net MVC and Linq To Entity.
I'm working on a project using this and am having a problem with the following line of code
ViewData["ProjectName"] = db.Projects.FirstOrDefault(p => p.ProjectId == task.ProjectId).ProjectName;
It works fine when the record exists but if no record exist it errors becau...
I'm localizing application and need to provide JSON representation of local and global resources for JS part of application for all views. My current idea is I'd implement HtmlHelper extension methods like GetLocalResourcesJSON/GetGlobalResourcesJSON which should encode all resource keys+values and return them JSON encoded as string (I'd...
I have started using asp.net MVC and as traditional way I want to keep my data access layer in WCF service. How can I achieve that using asp.net MVC ?
Scenario
I started a test application in asp.net MVC which Displays, Inserts and Edit data.
I successfully created that by adding 'ADO.Net Entity Data Model'.
So now if I wanted to move...
In my ASP.NET MVC application, one of my actions is going to take a while -- it kicks off a sequence of other tasks. I'd like to report progress to the user. I want to display text -- I don't want a simple progress bar or spinner.
How should I go about doing the two parts? First, how do I display progress to the user? Second, how should...
[Route Table 1][1]
This image shows how to define the RouteTable in C#, using the Route Class. How to define it in VB.NET?
...
I have a Linq to Sql Model generated by VS ORD, but I want to make a changes to it to work around a couple of issues. I can change the designer.cs generated code , but if I ever need to recreate a table within the model, then I delete it and drag it back to the ORD. This however loses all of my customisations. Is there another way?
I ha...
I have an extension method to HtmlHelper:
<%= Html.MyMethod( params )%>
It works in visual studio, but throws (at runtime):
Compiler Error Message: CS0117: 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'MyMethod'
The odd bit is that this does work:
<%= HtmlHelperExtensions.MyMethod( Html, params ) %>
Why does ...
I am trying to generate such HTML
<form action="/some/process" method="post">
<input type="hidden" name="foo.a" value="aaa"/>
<input type="hidden" name="bar.b" value="bbb"/>
<input type="submit" />
</form>
so it can be processed by this Action:
public ActionResult Process(Foo foo, Bar bar)
{
...
ActionLinks
This Image shows type-safe method of defining the Actionlinks ,how to define it in VB.NET
...
I am looking to create a blog and a forum on a new website. I would like for users to register to post in the forums and post comments on the blog as well as having thier own public profile page.
I have experience with BlogEngine.NET so was looking to use that. I have no experience with .NET forum software at this time so I am researchi...
Hi, I am trying to do pretty much the same, as is for example on sourceforge. After a user creates some data, i generate a file and i want it to be offered to him after a page loads. However, i know almost nothing about javascript and simple copy paste of
< script type="text/javascript">
var download_url = "http://downloads.sourceforge....
After I upload a file I try to delete it from my PC but it is saying that the file is in use.
What code am I missing to free the file to be deletable?
...