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