473,320 Members | 1,814 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,320 software developers and data experts.

VBScript question

I have just started using asp and was trying out a small file to see how
response.buffer works. The problem is I can't seem to see it work. I
have the following:

************************************************** **********8
<% Response.Buffer=true %>

<html>
<head>
<title>Add VBScript to HTML</title>
</head>
<body>

<%
Response.Write ("This is a test of the buffer.<BR>")
Response.Flush

Do while x <1000000
x = x + 1
loop

response.write("This text is generated about five seconds later.<br>")
response.write("x = " & x)
%>
</body>
</html>
************************************************** **************

I am running the webserver that comes with Windows 2K.

The flush is not working for some reason and I was wondering if I am
missing something.

Thanks,

Tom.

Jul 19 '05 #1
4 1590
Sorry, about the title - this is an ASP problem not a VBScript problem.
Had brain fade for a minute.

Tom.

Thomas Scheiderich wrote:
I have just started using asp and was trying out a small file to see how
response.buffer works. The problem is I can't seem to see it work. I
have the following:

************************************************** **********8
<% Response.Buffer=true %>

<html>
<head>
<title>Add VBScript to HTML</title>
</head>
<body>

<%
Response.Write ("This is a test of the buffer.<BR>")
Response.Flush

Do while x <1000000
x = x + 1
loop

response.write("This text is generated about five seconds later.<br>")
response.write("x = " & x)
%>
</body>
</html>
************************************************** **************

I am running the webserver that comes with Windows 2K.

The flush is not working for some reason and I was wondering if I am
missing something.

Thanks,

Tom.


Jul 19 '05 #2
I find it works best this way. End your ASP script right before you want
the output to buffer.
<%
Response.Buffer=true
Response.Write ("This is a test of the buffer.<BR>")
%>

<%
Response.Flush()
Do while x <1000000
x = x + 1
loop

response.write("This text is generated about five seconds later.<br>")
response.write("x = " & x)
%>

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Thomas Scheiderich" <tf*@deltanet.com> wrote in message
news:40**************@deltanet.com...
I have just started using asp and was trying out a small file to see how
response.buffer works. The problem is I can't seem to see it work. I
have the following:

************************************************** **********8
<% Response.Buffer=true %>

<html>
<head>
<title>Add VBScript to HTML</title>
</head>
<body>

<%
Response.Write ("This is a test of the buffer.<BR>")
Response.Flush

Do while x <1000000
x = x + 1
loop

response.write("This text is generated about five seconds later.<br>")
response.write("x = " & x)
%>
</body>
</html>
************************************************** **************

I am running the webserver that comes with Windows 2K.

The flush is not working for some reason and I was wondering if I am
missing something.

Thanks,

Tom.

Jul 19 '05 #3
That seemed to work fine. BTW, the book said that you need to have the
<% Response.Buffer %> at the top of the page before the <HTML> line. Is
this correct?

Thanks,

Tom.

Aaron Bertrand [MVP] wrote:
I find it works best this way. End your ASP script right before you want
the output to buffer.
<%
Response.Buffer=true
Response.Write ("This is a test of the buffer.<BR>")
%>

<%
Response.Flush()
Do while x <1000000
x = x + 1
loop

response.write("This text is generated about five seconds later.<br>")
response.write("x = " & x)
%>


Jul 19 '05 #4
"Thomas Scheiderich" wrote:

...BTW, the book said that you need to have the
<% Response.Buffer %> at the top of the page before
the <HTML> line. Is this correct?


In a sense, yes. Read this:
http://msdn.microsoft.com/library/en...bom_resopb.asp

Two things that are relevant to your question are (a) you cannot change this
property once the server starts sending content to the browser, and (b) for
servers running Windows 2000 and later (specifically, IIS 5+), the default
value is TRUE.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #5

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

Similar topics

8
by: Dave Thomas | last post by:
I have developed a web site using asp pages that use both vbscript and javascript. Run the site on my PC and everything is fine. Ftp to my web hosting provider which hosts asp pages and look on my...
3
by: Dana | last post by:
I have a form with a couple of dropdown fields. the dropdown fields get the value from one table which is a reference table. The table consists of 3 columns - type, id, name. An example would...
5
by: Leszek | last post by:
Hello gurus! I wrote a code in VBS, that will check, that current user is in one from three groups. But i don't know how asimilate it with asp.net. This page will be a bridge between 2 - main...
1
by: Ian Sedwell | last post by:
Hi guys Many thanks to all who replied to my original question. Actually, it's dead easy and the way I was doing it was correct the first time. You do indeed simply call the VBScript routine...
3
by: Mark Fox | last post by:
Hello, I am porting some old ASP 3.0 VBScript code to C#.NET and am not sure what the equivalent C# functions are for a couple VBScript functions. So my first question is: 1) Is there...
3
by: AutoShutdown | last post by:
I am using VBscript in a asp file. lets say I have a value... abc="JDD-20015-19,12" def="JDD-20015-07,8" Question (1)
4
by: sparky | last post by:
I've been working on an ASP driven website, on a client's web hosting space. One of the project requirements was the ability for the client to be able to upload files through an HTTP form. No...
0
by: thisis | last post by:
Hi All, I'm getting an error on my ASP page: Microsoft VBScript runtime error '800a000d' Type mismatch: 'StoreFileIntoField' I assume - 99.5% - the error is generated because of worng...
2
by: tunk | last post by:
I dont know where to start my question so let me tell you my story :) The ASP that cause me trouble is running on IIS that set ASP default language to JScript instead of VBScript. This ASP page...
1
by: Andrew Wan | last post by:
How can VBScript code access JScript code variables in the same ASP page? <SCRIPT LANGAUGE="VBScript"> Dim a a = 10 </SCRIPT> <SCRIPT LANGUAGE="JScript"> Response.Write(a); </SCRIPT>
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...

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.