473,385 Members | 1,640 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Reduce HTML file size


How can I reduce the size of the HTML output produced by Visual Studio 2005
ASP.NET controls.

I have some pages that are 500 - 750kb.

I thought that viewstate would be to blame but the worst of it is code like
this.

<a class="ctl00_ContentPlaceHolder1_tabSubject__ctl0_ tvSubject_0
ctl00_ContentPlaceHolder1_tabSubject__ctl0_tvSubje ct_1"
href="javascript:__doPostBack('ctl00$ContentPlaceH older1$tabSubject$_ctl0$tvSubject','s65\\1')"
onclick="TreeView_SelectNode(ctl00_ContentPlaceHol der1_tabSubject__ctl0_tvSubject_Data,
this,'ctl00_ContentPlaceHolder1_tabSubject__ctl0_t vSubjectt21');"
id="ctl00_ContentPlaceHolder1_tabSubject__ctl0_tvS ubjectt21">EU</a>

Is there anyway to compress these variable names.

Thanks

C

Mar 20 '07 #1
4 2585
How can I reduce the size of the HTML output produced by Visual Studio
2005 ASP.NET controls.

I have some pages that are 500 - 750kb.

I thought that viewstate would be to blame but the worst of it is code
like this.
Viewstate is often to blame. Definitely turn off viewstate on any of the
controls you don't need it for.

<a class="ctl00_ContentPlaceHolder1_tabSubject__ctl0_ tvSubject_0
ctl00_ContentPlaceHolder1_tabSubject__ctl0_tvSubje ct_1"
href="javascript:__doPostBack('ctl00$ContentPlaceH older1$tabSubject$_ctl0$tvSubject','s65\\1')"
onclick="TreeView_SelectNode(ctl00_ContentPlaceHol der1_tabSubject__ctl0_tvSubject_Data,
this,'ctl00_ContentPlaceHolder1_tabSubject__ctl0_t vSubjectt21');"
id="ctl00_ContentPlaceHolder1_tabSubject__ctl0_tvS ubjectt21">EU</a>

Is there anyway to compress these variable names.
I don't think so, as that's all being created by the compiler itself.

FYI, if this is a public facing site, note that link buttons aren't terribly
accessible. You might want to forgo the ASP.net menu altogether and go with
a nice HTML + CSS solution.

-Darrel
Mar 20 '07 #2
On Tue, 20 Mar 2007 15:53:58 -0000, C Mann wrote:
How can I reduce the size of the HTML output produced by Visual Studio 2005
ASP.NET controls.

I have some pages that are 500 - 750kb.

I thought that viewstate would be to blame but the worst of it is code like
this.

<a class="ctl00_ContentPlaceHolder1_tabSubject__ctl0_ tvSubject_0
ctl00_ContentPlaceHolder1_tabSubject__ctl0_tvSubje ct_1"
href="javascript:__doPostBack('ctl00$ContentPlaceH older1$tabSubject$_ctl0$tvSubject','s65\\1')"
onclick="TreeView_SelectNode(ctl00_ContentPlaceHol der1_tabSubject__ctl0_tvSubject_Data,
this,'ctl00_ContentPlaceHolder1_tabSubject__ctl0_t vSubjectt21');"
id="ctl00_ContentPlaceHolder1_tabSubject__ctl0_tvS ubjectt21">EU</a>

Is there anyway to compress these variable names.

Thanks

C
You can start by eliminating from your pages any unnecessary text and/or
controls. For instance you don't need an ASP.NET label when plain old text
will do.

Once you have trimmed in this manner then you can look at a number of
options
- IIS compression
- HTTPModule compression
- Tools like http://www.freesoft.fsnet.co.uk/html01.htm

Read these links for more info:

-
http://www.microsoft.com/belux/msdn/...mpression.mspx
- http://www.codeproject.com/aspnet/HttpCompress.asp

--
Bits.Bytes
http://bytes.thinkersroom.com
Mar 20 '07 #3

Thanks Darrel.

Back to the old school eh? :)

The link buttons can go, they really don't help.

C

"darrel" <no*****@nowhere.comwrote in message
news:uK*************@TK2MSFTNGP05.phx.gbl...
>How can I reduce the size of the HTML output produced by Visual Studio
2005 ASP.NET controls.

I have some pages that are 500 - 750kb.

I thought that viewstate would be to blame but the worst of it is code
like this.

Viewstate is often to blame. Definitely turn off viewstate on any of the
controls you don't need it for.

><a class="ctl00_ContentPlaceHolder1_tabSubject__ctl0_ tvSubject_0
ctl00_ContentPlaceHolder1_tabSubject__ctl0_tvSubj ect_1"
href="javascript:__doPostBack('ctl00$ContentPlace Holder1$tabSubject$_ctl0$tvSubject','s65\\1')"
onclick="TreeView_SelectNode(ctl00_ContentPlaceHo lder1_tabSubject__ctl0_tvSubject_Data,
this,'ctl00_ContentPlaceHolder1_tabSubject__ctl0_ tvSubjectt21');"
id="ctl00_ContentPlaceHolder1_tabSubject__ctl0_tv Subjectt21">EU</a>

Is there anyway to compress these variable names.

I don't think so, as that's all being created by the compiler itself.

FYI, if this is a public facing site, note that link buttons aren't
terribly accessible. You might want to forgo the ASP.net menu altogether
and go with a nice HTML + CSS solution.

-Darrel

Mar 20 '07 #4
On Mar 20, 5:34 pm, "C Mann" <c...@nospam.nospamwrote:
Thanks Darrel.

Back to the old school eh? :)

The link buttons can go, they really don't help.

C

"darrel" <notr...@nowhere.comwrote in message

news:uK*************@TK2MSFTNGP05.phx.gbl...
How can I reduce the size of the HTML output produced by Visual Studio
2005 ASP.NET controls.
I have some pages that are 500 - 750kb.
I thought that viewstate would be to blame but the worst of it is code
like this.
Viewstate is often to blame. Definitely turn off viewstate on any of the
controls you don't need it for.
<a class="ctl00_ContentPlaceHolder1_tabSubject__ctl0_ tvSubject_0
ctl00_ContentPlaceHolder1_tabSubject__ctl0_tvSubje ct_1"
href="javascript:__doPostBack('ctl00$ContentPlaceH older1$tabSubject$_ctl0$t*vSubject','s65\\1')"
onclick="TreeView_SelectNode(ctl00_ContentPlaceHol der1_tabSubject__ctl0_tvS*ubject_Data,
this,'ctl00_ContentPlaceHolder1_tabSubject__ctl0_t vSubjectt21');"
id="ctl00_ContentPlaceHolder1_tabSubject__ctl0_tvS ubjectt21">EU</a>
Is there anyway to compress these variable names.
I don't think so, as that's all being created by the compiler itself.
FYI, if this is a public facing site, note that link buttons aren't
terribly accessible. You might want to forgo the ASP.net menu altogether
and go with a nice HTML + CSS solution.
-Darrel- Hide quoted text -

- Show quoted text -
rename controls with shorter name

Mar 20 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Peter CCH | last post by:
Database log of my DB is around 2GB. The database is using FULL recovery option. I want to reduce the file size of the log cause it takes up a lot of space. I'd do a full database backup,...
6
by: Sean C. | last post by:
Helpful folks, I am having a hard time figuring out how to reduce my percentage of dirty page steal activity. Below are statistics for three fairly normal days, with the bufferpool hit ratios...
2
by: Sue | last post by:
Is there any way to reduce the size of my db2 log files? My sqlogdir is 69gb with hundreds of log files, more than the size of the database itself, and I am running out of hard disk space. I am...
11
by: Parrot | last post by:
Is there any routine I can call to reduce the size of an image file after uploading a file from a client. I am looking to reduce file sizes programmatically using C# in my web page after uploading....
1
by: ShailendraPune | last post by:
I have one db test with one .mdf and .ldf file. ..mdf file size is 100mb and for some reson i removed all the tables from that .mdf file and transfer it into new secondary file so all the tables...
0
by: support1 | last post by:
Hi, I have 10GB of harddisk space and now the harddisk space remaining 2GB because of the IBData1 size too big. As I'm check in the administrator tool. There is no any option to reduce or delete...
1
by: replyrpatil | last post by:
What I am trying to do: I need to print a compact access report (font 6 size) created using RTF2 program developed by Stephen Lebans to generate a TIF image of custom size (5.5 in x 2.0 in) ...
1
by: PK Pradeep | last post by:
Iam a fresher to the MS Acess world. Question is How to reduce the MDB file Size. I maintain a Access Data base where there are 5 Tables with each table containing 60, 000+ lines. If I delete the...
5
by: aradhanathawait | last post by:
Hi all I have to capture the video clipping of a person and email it. I am using ezVidCap control for capturing video with .avi extension. If the size of video clip is less than 2 MB then mail is...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.