I need page size of generated aspx page, how and when I can get this
information programmatically 13 2113
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*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... I need page size of generated aspx page, how and when I can get this information programmatically
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*****@PLEASEDONTSPAMMEmsn.com> wrote in message
news:uA**************@tk2msftngp13.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*********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...I need page size of generated aspx page, how and when I can get this information programmatically
i need this on server side
you say that is not possible to calculate size of
Response.OutputStream!?
"S.M. Altaf [MVP]" <sm*****@PLEASEDONTSPAMMEmsn.com> wrote in message
news:uA**************@tk2msftngp13.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*********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...I need page size of generated aspx page, how and when I can get this information programmatically
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.ServerVariables("CONTENT_LENGTH")
and
Request.ContentLength ...and can't.
but I always get a content length of 0 if I do.
I think that the problem is that Request.ServerVariables 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*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... I need page size of generated aspx page, how and when I can get this information programmatically
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*********@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl... i need this on server side you say that is not possible to calculate size of Response.OutputStream!?
"S.M. Altaf [MVP]" <sm*****@PLEASEDONTSPAMMEmsn.com> wrote in message news:uA**************@tk2msftngp13.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*********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...I need page size of generated aspx page, how and when I can get this information programmatically
An alternative is to put everything in the page inside a div, and set the
style of it to width:100%;height: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**************@TK2MSFTNGP09.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*****@PLEASEDONTSPAMMEmsn.com> wrote in message news:uA**************@tk2msftngp13.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*********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...I need page size of generated aspx page, how and when I can get this information programmatically
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***@DIESPAMMERSDIEtakempis.com> wrote in message
news:e8**************@TK2MSFTNGP09.phx.gbl... An alternative is to put everything in the page inside a div, and set the style of it to width:100%;height: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**************@TK2MSFTNGP09.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*****@PLEASEDONTSPAMMEmsn.com> wrote in message news:uA**************@tk2msftngp13.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*********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... I need page size of generated aspx page, how and when I can get this information programmatically
Ah, sorry.
--
Kevin Spencer
Microsoft MVP
..Net Developer
A watched clock never boils.
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:eZ**************@TK2MSFTNGP12.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***@DIESPAMMERSDIEtakempis.com> wrote in message news:e8**************@TK2MSFTNGP09.phx.gbl... An alternative is to put everything in the page inside a div, and set the style of it to width:100%;height: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**************@TK2MSFTNGP09.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*****@PLEASEDONTSPAMMEmsn.com> wrote in message news:uA**************@tk2msftngp13.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*********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... >I need page size of generated aspx page, how and when I can get this >information programmatically > >
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*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... I need page size of generated aspx page, how and when I can get this information programmatically
That works, alright.
I think he wanted to do that on-the-fly, though.
That might prove to be a bit more difficult.
I know that, on a postback, you can get it from Request.ServerVariables,
but am unsure how to do it any other way on-the-fly.
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/
======================================
"Bruce Barker" <br******************@safeco.com> wrote in message
news:OQ**************@TK2MSFTNGP09.phx.gbl... 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*********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...I need page size of generated aspx page, how and when I can get this information programmatically
You may well be able to do it via an ihttpmodule response filter, as it
passes the binary stream into the filter, and you could use sizeOf or some
appropriate method to find the size of the byte stream. I cant remember
however if the headers have been added at this point or not, I guess it
depends where you invoke the filter.
--
Regards
John Timney
ASP.NET MVP
Microsoft Regional Director
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:O7**************@TK2MSFTNGP09.phx.gbl... 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*********@hotmail.com> wrote in message news:%2***************@TK2MSFTNGP15.phx.gbl...i need this on server side you say that is not possible to calculate size of Response.OutputStream!?
"S.M. Altaf [MVP]" <sm*****@PLEASEDONTSPAMMEmsn.com> wrote in message news:uA**************@tk2msftngp13.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*********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... I need page size of generated aspx page, how and when I can get this information programmatically
You don't consider JavaScript to be part of the "ASP.NET model"? That's
surprising.
--------------------------------------------------------------------------------
All that glitters has a high refractive index. www.mendhak.com
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OB**************@TK2MSFTNGP09.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*****@PLEASEDONTSPAMMEmsn.com> wrote in message news:uA**************@tk2msftngp13.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*********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...I need page size of generated aspx page, how and when I can get this information programmatically
If your solution had been custom-tailored for
use in an ASP.NET environment, then yes.
As you well, know, inserting JavaScript in ASP.NET
cannot be done by simply writing it into the page.
There's some tweaking that has to be done, like registering
the script and changing the way that the string is written.
Simply throwing a Javascript script at a beginning ASP.NET
programmer, like the ones who mostly wander in here, is not
offering a viable solution which they can use.
Like I said, if you have a solution for ASP.NET, please post it,
or post a link to where a viable solution can be found.
I have a feeling that the solution you posted
does not work if used within ASP.NET, anyway.
Did you verify that it does work in ASP.NET ?
( After modifying the way the script is written,
so that it can be inserted in an ASPX page ?)
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*****@PLEASEDONTSPAMMEmsn.com> wrote in message
news:Ox**************@TK2MSFTNGP09.phx.gbl... You don't consider JavaScript to be part of the "ASP.NET model"? That's surprising.
"Juan T. Llibre" <no***********@nowhere.com> wrote in message news:OB**************@TK2MSFTNGP09.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*****@PLEASEDONTSPAMMEmsn.com> wrote in message news:uA**************@tk2msftngp13.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*********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... I need page size of generated aspx page, how and when I can get this information programmatically
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
by: Nathan Ernst |
last post by:
I have a pretty simple XSD schema:
********************************************
* XSD SCHEMA
********************************************
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema...
|
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:...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |