C# - How To Minify Aspx Pages
Sep 30, 2010
I am developing a web-based Pokemon Online game. Since it is online, I would like to optimize it to run as quickly possible. I've installed Firebug and Page Speed minifying my HTML output. I'm also using VS2008, ASP.NET 3.5, AJAX, and IIS 7.5; along with URL-Rewriting. I want to minify my HTML, JavaScript, and CSS. Optimally, I'd like the minifying process to happen at compile time. I've spend hours looking online but couldn't find a decent solution,
View 3 Replies
Similar Messages:
Oct 11, 2010
I wrote a test page that does a bunch of busy work in a method called at page load. This process as I have it now takes around 12 seconds.
If I try to load another page while the first long running page is loading, this second page doing nothing except writing out a world, it doesn't load until the first long running page is finished.
Why is this the case? I would think IIS would be able to handle multiple concurrent connections, it seems crazy that one long running page would stop every other page in the application from loading. I must be missing something or not understand how IIS works.
I would think multiple independent requests would be spawned on different threads. Is this only the case if the requests are from different sessions entirely? Are all requests from a single session bound to a single thread?
View 1 Replies
May 11, 2010
I am working on a big .NET project. I am currently creating an automated minifier for JS and CSS files using YUI compressor. After doing some research, I found that the heaviest files in the project are actually .NET resources (Like MS ajax file). They are very big and unminified.I am wondering, is there any way to minify them?
View 3 Replies
Oct 31, 2010
I'm trying to write a templated user control that get's as a template the js code from the user,And minifies it on the fly (OnInit), and actually prints the minified JS.That means that I need a code that receives a string, and returns a string.All I found untill know are programs that uses the input output from the hard-drive, something that I can't allow.Is there any C# Libraries relevant to my issue need ?
View 1 Replies
Nov 30, 2010
I have an asp.net-mvc application, and when I look at the page's source I see the html is indented, has lots of white space, I think if I will remove all these spaces, my page will become smaller in KBanybody knows how to remove them automatically ?
View 4 Replies
May 5, 2010
Hey as you guys know I'm not so good at CSS. I wrote a site for a business a friend is starting using it, I've got it hosted on the web now, but all the pages but Default.aspx ignore the CSS file.
View 4 Replies
Jul 29, 2010
I found that i can use Response.WriteFile to include them and most of the pages work, except that the login page is not working.
View 4 Replies
Nov 11, 2010
I know an ASP.NET app can have as many aspx pages as you want but after hitting a certain number of them (over 100) should I consider a different design? Or, as the months/years go by do I just keep adding more and more pages to my app?
View 3 Replies
Jun 17, 2010
I am using a shared hosting so I can't touch IIS, but is there anyway I could do in Global.asax or web.config that would redirect links like mysite.com/folder/ to a specific page?
View 1 Replies
Oct 28, 2010
I've recently launched my page but the aspx files are not reading the cs pages. For instance, my login page has c# redirecting users based on roles, but it just ignored the c# and goes to default.aspx. Everything works perfect in the development environment..
View 14 Replies
Feb 16, 2011
how i can hide .aspx from all my pages in my project
View 2 Replies
Oct 14, 2010
I had an ASP.NET 1.1 application that I converted to 2.0. I deployed the application under IIS 7 on Windows 2008 Server. I can browse images and static html pages but I can't browse .aspx pages. When I try to run any .aspx page, my browser says "Internet Explorer cannot display the webpage". My application pool is set to .NET framework 2.0 with Integraded in Managed Pipeline mode.
View 5 Replies
Mar 25, 2010
How do i get the pretty URL with an ASPX pages. I have listed a couple links below and their associated print page url. As you can see it resembles the Class instantiation method of declaring object but is used for a webpage with its extension.
I was wondering if this method can be used or if this is a URL rewrite to mask all the querystrings and sub directories being referenced. I remember doing stuff like this when i was working on a UNIX system using the .htaccess file to mask effective query
string being shown. I believe they called it a Clean URL, i maybe wrong as it has been well over 8 years since i dealt with the Unix .htaccess file and massaging urls with it.
For instance, look at the MSDN site pages:
http://msdn.microsoft.com/en-us/library/system.servicemodel.actionnotsupportedexception.aspx
Now when you want to print it:
http://msdn.microsoft.com/en-us/library/system.servicemodel.actionnotsupportedexception(printer).aspx
Now you select the same page but choose a different framework than its birth:
http://msdn.microsoft.com/en-us/library/system.servicemodel.actionnotsupportedexception(VS.100).aspx
and the print URL:http://msdn.microsoft.com/en-us/library/system.servicemodel.actionnotsupportedexception(VS.100,printer).aspx
As you can see they are not visually passing query strings but more like Class parameters. Is this just a simple URL rewrite after the page is loaded so the user doesnt see the query string information?
View 3 Replies
Jun 28, 2010
Quick question... Is it possible to programmatically create and .aspx file on the fly, complete with Master page and user controls?
If it is, can anyone point me in the direction of how this can be done?
View 5 Replies
Feb 17, 2011
I'm wondering if you can use a lightbox with aspx pages? For my project, i'm trying to make some kind of search tool in that lightbox. On my default page , you have a img link that opens a lightbox (with an aspx page) In that lightbox, when you click a button (asp button), the page renders like a normal full browser page with the same content. The page should stay in that lightbox and rendering the results in a listbox. Is this possible? Or is this the wrong way?
View 2 Replies
Sep 3, 2010
I need to create a code that reads the QueryString and set a value on the Session and on the end of the page I need to clear the Session.
How can I make a code like this to run on all .aspx pages?
View 6 Replies
Nov 15, 2010
How to Dispaly the username on all aspx pages....?
am thinking that by using "session object" we can able to do this...bt am not sure
Can any send the code or links
View 3 Replies
Mar 29, 2011
what are the differences between .aspx and .ashx pages. I use ashx now when I need to handle a request that called from code and return with a response.
View 3 Replies
Nov 12, 2010
I am posting this here after not getting any responses on StackOverflow.
Last night I upgraded my MVC2 project to MVC3 RC. I followed all the instructions in the release notes and upon running my project (With the Index action of the home controller coming up by default) the following exception occurred:
"Exception Details: System.InvalidOperationException: The view at '~/Views/Home/Index.aspx' must derive from ViewPage, ViewPage<TModel>, ViewUserControl, or ViewUserControl<TModel>."
All of my coding so far has been in areas, and I have not touched the Home/Index view in any significant way, and it worked last night prior to the upgrade. For reference, my view has the following code:
[Code]....
As you can see, I am inheriting from ViewPage even though it claims I am not. The HomeController.Index() view is exactly as what gets installed via a new MVC2 project. I did get pointed to the post here, and upon seeing that I tried a few things. First I tried to manually set my view engines in Global.asax like so:
[Code]....
This doesn't change anything, I still get the exception (even commenting out the RazorViewEngine call). Next I tried to go into the Home controller and did:
[Code]....
And this didn't work either. As of right now I"m at a standstill, as I can't run any of my pages currently. I use source control, so I can revert but I do want to take advantage of things in MVC3.
View 5 Replies
Jan 6, 2011
Whats the best way to systematically debug the aspx pages ( not C# or Vb.NET managed code). Sometimes a small syntax or semantic error in aspx page displays " Internal server error or something similar" and I had to comment the last changes step by step to find out the error.
Is there any other systematic way of doing this ?
View 1 Replies
May 14, 2010
i m facing problem in converting .html pages to .aspx using c#secnario isi got one index.html pagei have to convert index.html into .aspx pages and that to in four pastop part as a.aspxmiddle part as b.aspxbottom part as c.aspxand then in d.aspx i have to combine all the three parts and call them in d.aspx...
View 7 Replies
Feb 5, 2010
is there any alternative to use regions in ASPX pages?
View 6 Replies
Jan 11, 2011
I am looking for an tried-and-tested approach to share .ASPX webpages across websites. E.g. I have a generic error page which I would like to share between x.com and y.com sites.
View 3 Replies
Sep 4, 2010
I'm just starting out learning ASP.NET. From what I understand, ASP.NET differs from old school ASP in that the logic code for a page exists in as separate file rather then being embedded in the ASP page. So when a user requests a page like ShoppingCart.aspx the server reads the directive at the top ...
<%@ Page Title="" Language="C#" MasterPageFile="~/Styles/Site.Master" AutoEventWireup="true"
CodeBehind="MyShoppingCart.aspx.cs" Inherits="TailspinSpyWorks.MyShoppingCart" %>
This tells the server what file and what class in the file is associated with the page. The code behind class also has member variables that correspond to each control on the page, and provide a way for code in the code behind file to manipulate the controls.
First, do I understand this correctly?
Second, could a site be setup with two separate ASPX pages with identically named controls, which both had a directive pointing to the same file and class? Would you even want to do this? Both pages could have the same functionality but a different layout. I was thinking this could be a way to create separate "desktop" and "mobile" versions of a page with out duplicating content in the code behind files.
I guess ultimately what I'm wondering, is if there a way to define an abstract page? Say create an abstract page definition that says a page must have controls "cart_list", "total_lbl", but then be able to have multiple pages that inherit from this abstract page?
View 5 Replies
Jan 14, 2011
We develop an ASP.Net web application that is hosted on an internal network. Currently, we have some ASPX pages that handle web requests from the client side and interact with our servers. We are starting development on our next major application version, and we are deciding on the architecture. What are the differences between using ASPX pages to handle http requests as compared to using a full blown Web Service (which would most likely be a WCF Service)? In researching this issue, I have come across a few related posts that have been moderately helpful, seen here and here. My understanding of some of the key differences are as follows:
ASPX pages are limited in the kinds of requests they can receive. They are strictly HTTP whereas a WCF service can have multiple endpoints to service a variety of protocols (HTTP, TCP, etc). WCF Services are more concretely defined due to ServiceContracts. This means that if a project makes a reference to the service, they know exactly what to expect in terms of methods, usage and documentation. An ASPX page is more of a free for all in terms of methods contained and requests accepted. However, based on these concepts, my issues are as follows:
The ability to support different protocols is a great feature in terms of future proofing and compatibility, but what real benefit are we seeing if we are currently only using it to interact via HTTP? In line with my previous argument, if we are only interacting with the service over a web, do any of those points really make any difference? An http request doesn't care about any of those finer details or contractual guarantees so long as the method it calls "just works".
Is there anything I am missing? Any key benefit to using a service? Personally, I support the Web Service architecture. I like the idea of having a flexible and well defined system that can support future development. What I am basically looking to get out of this is a way to go to a coworker and say "This should be a service for x y z reasons and we could see a b c improvements for doing so".
View 5 Replies