can you control where response.writes?

D

D

Hi

I'm obviously still learning here but what I've created is a page with a
calendar and button. When I click the button I do a number of tasks and
would like to output the progress in messages such as

Starting TaskA
Processing TaskA
Completed TaskA

Starting TaskB
Processing TaskB
Processing Failed for TaskB

This page is a child page of a master page that is actually a child of
another master page, creating a look like the MSDN site with a tree control
on the left side and the logo and other info across the top (the highest
master page in this set up) and content in the center.

When I do a response.write the text comes out across the top of the screen,
in the master page. So I'm trying to think of how I could display the text
below the button on the content page. I've looked at various progress bar
setups but most of them are using a single line and the next message erases
the previous message. I'm thinking more like a list box that gets filled
with messages but I cannot think of how to accomplish this.

Thanks alot for any ideas you might have.

Best Regards.
 
D

David Wier

A response.write will now, due to the paradigm shift between Classic ASP and
ASP.Net always write at the top of the page.
To be able to put text in certain, exact places, create a lable where you
want the text - then, instead of doing a response.write, use:
Label1.text=StartingTaskA
label1.text+=StartingTaskB - - of course, you'll need to add "<br />" if you
want line feeds.......
 
G

Guest

D,
Besides David's comments, you should also be aware that your ASP.NET Page
class is compiled, not interpreted as in classic ASP, so if you are
attempting to output timed messages (somthing you can do with interpreted
languages) you may be quite disappointed.
Peter
 
D

D

I was reading an article on nested master pages and where 'writes' go (at
the top level of the control tree) so I'm clear on what was happening now.

I ended up using something similiar but with a multi line text box. I
actually created a control that has a clear function and a logmessage
function that adds a new line character.

Not as dynamic as I wanted but works well for what I need.


Thanks
 
D

D

Thanks. I came across an article from your cafe that was describing that and
using a progress type bar.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top