473,776 Members | 1,665 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to get size of generated aspx page

I need page size of generated aspx page, how and when I can get this
information programmaticall y
Nov 19 '05 #1
13 2156
There is an example given here:
http://www.quirksmode.org/js/filesize.html

But it'll work in IE and not FireFox. If you're trying to do this through
server side code on the same page, that'd be something of a paradoxical
infinite loop, since the code would need to check for the final size of the
page after it's been sent to the client, and not during generation.

HTH

-Altaf

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com

"TomislaW" <to*********@ho tmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I need page size of generated aspx page, how and when I can get this
information programmaticall y

Nov 19 '05 #2
re:
If you're trying to do this through server side code
That's what we do in this newsgroup, Altaf.

Client-side solutions which have not been modifed
for use within an ASP.NET page are of little interest.

If you have a solution for ASP.NET, please post it.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"S.M. Altaf [MVP]" <sm*****@PLEASE DONTSPAMMEmsn.c om> wrote in message
news:uA******** ******@tk2msftn gp13.phx.gbl... There is an example given here:
http://www.quirksmode.org/js/filesize.html

But it'll work in IE and not FireFox. If you're trying to do this through server side
code on the same page, that'd be something of a paradoxical infinite loop, since the
code would need to check for the final size of the page after it's been sent to the
client, and not during generation.

HTH

-Altaf

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com

"TomislaW" <to*********@ho tmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I need page size of generated aspx page, how and when I can get this information
programmatica lly


Nov 19 '05 #3
i need this on server side
you say that is not possible to calculate size of
Response.Output Stream!?
"S.M. Altaf [MVP]" <sm*****@PLEASE DONTSPAMMEmsn.c om> wrote in message
news:uA******** ******@tk2msftn gp13.phx.gbl...
There is an example given here:
http://www.quirksmode.org/js/filesize.html

But it'll work in IE and not FireFox. If you're trying to do this through
server side code on the same page, that'd be something of a paradoxical
infinite loop, since the code would need to check for the final size of
the page after it's been sent to the client, and not during generation.

HTH

-Altaf

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com

"TomislaW" <to*********@ho tmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I need page size of generated aspx page, how and when I can get this
information programmaticall y


Nov 19 '05 #4
See an example at : http://asp.net.do/test/servervars.aspx

If you select CONTENT_LENGTH from the dropdown,
you'll see the correct document size ( 2672 bytes, in this case ).

The only problem is that I've tried to get this directly :

Request.ServerV ariables("CONTE NT_LENGTH")
and
Request.Content Length ...and can't.

but I always get a content length of 0 if I do.

I think that the problem is that Request.ServerV ariables only
includes the headers the client sends back to the server,
and not all the headers the server sends.

However, I don't understand why the example I used ( see link above ),
based on Microsoft-supplied code, *does* retrieve the correct value.

I'll have to check this out some more.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"TomislaW" <to*********@ho tmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I need page size of generated aspx page, how and when I can get this information
programmatical ly

Nov 19 '05 #5
You might be able to with WebHttpRequest.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"TomislaW" <to*********@ho tmail.com> wrote in message
news:%2******** *******@TK2MSFT NGP15.phx.gbl.. .
i need this on server side
you say that is not possible to calculate size of
Response.Output Stream!?
"S.M. Altaf [MVP]" <sm*****@PLEASE DONTSPAMMEmsn.c om> wrote in message
news:uA******** ******@tk2msftn gp13.phx.gbl...
There is an example given here:
http://www.quirksmode.org/js/filesize.html

But it'll work in IE and not FireFox. If you're trying to do this through server side
code on the same page, that'd be something of a paradoxical infinite loop, since the
code would need to check for the final size of the page after it's been sent to the
client, and not during generation.

HTH

-Altaf

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com

"TomislaW" <to*********@ho tmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I need page size of generated aspx page, how and when I can get this information
programmatic ally



Nov 19 '05 #6
An alternative is to put everything in the page inside a div, and set the
style of it to width:100%;heig ht:100%. Then you can use the offsetWidth
property and offsetHeight property of the div to get the width and height of
the page, using JavaScript. This should work in all browsers.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
A watched clock never boils.

"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:OB******** ******@TK2MSFTN GP09.phx.gbl...
re:
If you're trying to do this through server side code


That's what we do in this newsgroup, Altaf.

Client-side solutions which have not been modifed
for use within an ASP.NET page are of little interest.

If you have a solution for ASP.NET, please post it.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"S.M. Altaf [MVP]" <sm*****@PLEASE DONTSPAMMEmsn.c om> wrote in message
news:uA******** ******@tk2msftn gp13.phx.gbl...
There is an example given here:
http://www.quirksmode.org/js/filesize.html

But it'll work in IE and not FireFox. If you're trying to do this
through server side code on the same page, that'd be something of a
paradoxical infinite loop, since the code would need to check for the
final size of the page after it's been sent to the client, and not during
generation.

HTH

-Altaf

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com

"TomislaW" <to*********@ho tmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I need page size of generated aspx page, how and when I can get this
informatio n programmaticall y



Nov 19 '05 #7
He wants the total bytes generated by the request, not the screen size.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:e8******** ******@TK2MSFTN GP09.phx.gbl...
An alternative is to put everything in the page inside a div, and set the style of it to
width:100%;heig ht:100%. Then you can use the offsetWidth property and offsetHeight
property of the div to get the width and height of the page, using JavaScript. This
should work in all browsers.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
A watched clock never boils.

"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:OB******** ******@TK2MSFTN GP09.phx.gbl...
re:
If you're trying to do this through server side code


That's what we do in this newsgroup, Altaf.

Client-side solutions which have not been modifed
for use within an ASP.NET page are of little interest.

If you have a solution for ASP.NET, please post it.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"S.M. Altaf [MVP]" <sm*****@PLEASE DONTSPAMMEmsn.c om> wrote in message
news:uA******** ******@tk2msftn gp13.phx.gbl...
There is an example given here:
http://www.quirksmode.org/js/filesize.html

But it'll work in IE and not FireFox. If you're trying to do this through server side
code on the same page, that'd be something of a paradoxical infinite loop, since the
code would need to check for the final size of the page after it's been sent to the
client, and not during generation.

HTH

-Altaf

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com

"TomislaW" <to*********@ho tmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I need page size of generated aspx page, how and when I can get this information
programmati cally



Nov 19 '05 #8
Ah, sorry.

--

Kevin Spencer
Microsoft MVP
..Net Developer
A watched clock never boils.

"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:eZ******** ******@TK2MSFTN GP12.phx.gbl...
He wants the total bytes generated by the request, not the screen size.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:e8******** ******@TK2MSFTN GP09.phx.gbl...
An alternative is to put everything in the page inside a div, and set the
style of it to width:100%;heig ht:100%. Then you can use the offsetWidth
property and offsetHeight property of the div to get the width and height
of the page, using JavaScript. This should work in all browsers.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
A watched clock never boils.

"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:OB******** ******@TK2MSFTN GP09.phx.gbl...
re:
If you're trying to do this through server side code

That's what we do in this newsgroup, Altaf.

Client-side solutions which have not been modifed
for use within an ASP.NET page are of little interest.

If you have a solution for ASP.NET, please post it.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"S.M. Altaf [MVP]" <sm*****@PLEASE DONTSPAMMEmsn.c om> wrote in message
news:uA******** ******@tk2msftn gp13.phx.gbl...
There is an example given here:
http://www.quirksmode.org/js/filesize.html

But it'll work in IE and not FireFox. If you're trying to do this
through server side code on the same page, that'd be something of a
paradoxical infinite loop, since the code would need to check for the
final size of the page after it's been sent to the client, and not
during generation.

HTH

-Altaf

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com

"TomislaW" <to*********@ho tmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
>I need page size of generated aspx page, how and when I can get this
>informatio n programmaticall y
>
>



Nov 19 '05 #9
the easiest is the iis logs. you can even set up iis to write them to a
sqlserver database and do queries.

-- bruce (sqlwork.com)
"TomislaW" <to*********@ho tmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I need page size of generated aspx page, how and when I can get this
information programmaticall y

Nov 19 '05 #10

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

Similar topics

4
4884
by: Dr. StrangeDub | last post by:
I am looking for a way to capture the HTML file generated by an ASP.Net application (just as is sent back to the client) and save it to a designated spot on the web server. Here's a bit of background: our application has a Report function that dynamically creates a new page containing various tables of real-time data (through the C# code "behind" the .aspx file). We have a new requirement to add a file save function to this report page. ...
0
1372
by: Nathan Ernst | last post by:
I have a pretty simple XSD schema: ******************************************** * XSD SCHEMA ******************************************** <?xml version="1.0" encoding="utf-8" ?> <xs:schema id="PageHitStatistics" targetNamespace="urn:PageHitStatistics" elementFormDefault="qualified" xmlns="urn:PageHitStatistics"
3
10888
by: E | last post by:
I have 2 aspx pages... neither of which do anything out of the ordinary. One of the pages automatically generates this block of code when viewed at the client: ------------------------------------------------------------ <form name="webfrmForm" method="post" action="pokedex.aspx" id="webfrmForm"> <input type="hidden" name="__EVENTTARGET" value="" /> <input type="hidden" name="__EVENTARGUMENT" value="" /> <input type="hidden"...
6
2653
by: hb | last post by:
Hi, I have a page bill.aspx and its code-behind bill.aspx.cs. On bill.aspx I have: === Select a month: <asp:dropdownlist runat="server" id="lstDate" autopostback="True" /> <br> <asp:table runat="server" id="tabBill" /> <br>
4
3496
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a snippet from my .css file: *************************** body { margin:0; padding:0;
1
1565
by: derek | last post by:
I am using Visual Studio .NET Professional (first version) and am trying to view the generated C# file that is created from an ASP.NET (.aspx) page when its first requested. I can see where its being placed but it must be removed after the MSIL code is generated for it. Do you know any way to configure vstudio to keep the generated class files around so I can view them? I would like to analyze the
27
13070
by: ted benedict | last post by:
hi everybody, i hope this is the right place to discuss this weird behaviour. i am getting dynamically generated text or xml from the server side using xmlhttprequest. if the server side data is STATIC, i can have whatever size of data i want. but if the data (xml or text) is generated dynamically using php, then there seems to be a size limit! xmlhttprequest's responseText is truncated, and the xml therefore not well fromed. in border...
6
6019
by: Nathan Sokalski | last post by:
I recently converted some ASP.NET 1.1 projects of mine, created with Visual Studio .NET 2003, to Web Application Projects in Visual Studio .NET 2005 so that I could use ASP.NET 2.0 (All my ASP.NET is done using VB.NET). After converting, everything was fine, and worked and compiled correctly, but I noticed one big difference between the VB.NET code of the converted files in the projects and the VB.NET code in new pages. The new pages use...
2
2262
by: j | last post by:
I am getting this error when trying to compile code generated using xsd.exe: The type 'TrailerList' already contains a definition for 'rCMSTrailerListRow' c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\photoblobws\4e7bb29f\6f50d4db\App_Code.vnsjeqin.4.cs What could cause this error in a generated file? What should I look for in the code file to fix it?
0
10292
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7471
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5368
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2860
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.