473,789 Members | 2,441 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
13 2157
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.ServerV ariables,
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.c om> wrote in message
news:OQ******** ******@TK2MSFTN GP09.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*********@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 #11
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******** ******@TK2MSFTN GP09.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*********@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
informati on programmaticall y



Nov 19 '05 #12
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******** ******@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 #13
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*****@PLEASE DONTSPAMMEmsn.c om> wrote in message
news:Ox******** ******@TK2MSFTN GP09.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******** ******@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 #14

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
3497
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
13072
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
6020
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
9663
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10136
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
7525
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
6765
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
5415
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
5548
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4090
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.