473,503 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Updating label text

I have an ASP.NET page written in VB.NET that has a label:

<asp:Label runat="server" ID="lblStatus"
CssClass="LabelTxt"></asp:Label>

In my code behind, I am running some stored procedures and a DTS
package. Since the queries and the DTS package take a few seconds to
run, I want to update the status label after each step has completed:

lblStatus.Text = "Processing..."
' Process stored proc
lblStatus.Text &= "Done!<br>"
' Process DTS package
lblStatus.Text &= "Processing DTS Package...<br>"
' etc.

I know that I can do this if I do not use code behind by just using
Response.Write and Response.Flush() statements, as I would in classic
ASP.

However, is there a way on the server side to raise an event and update
the label accordingly? Any pointers would be appreciated.

Christian

Nov 19 '05 #1
2 3923
its done the same way in .net. turn off buffering, and do response write,
response flush.

-- bruce (sqlwork.com)
<ka******@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
| I have an ASP.NET page written in VB.NET that has a label:
|
| <asp:Label runat="server" ID="lblStatus"
| CssClass="LabelTxt"></asp:Label>
|
| In my code behind, I am running some stored procedures and a DTS
| package. Since the queries and the DTS package take a few seconds to
| run, I want to update the status label after each step has completed:
|
| lblStatus.Text = "Processing..."
| ' Process stored proc
| lblStatus.Text &= "Done!<br>"
| ' Process DTS package
| lblStatus.Text &= "Processing DTS Package...<br>"
| ' etc.
|
| I know that I can do this if I do not use code behind by just using
| Response.Write and Response.Flush() statements, as I would in classic
| ASP.
|
| However, is there a way on the server side to raise an event and update
| the label accordingly? Any pointers would be appreciated.
|
| Christian
|
Nov 19 '05 #2
Right, but the point is I would rather utilize the TExt property of the
label, so that way, I will have more control over the output on the
page. Hence my question, is there a way to raise an event on the
server side and then update the label text periodically? I would
rather NOT use response.write and response.flush.
bruce barker wrote:
its done the same way in .net. turn off buffering, and do response write, response flush.

-- bruce (sqlwork.com)
<ka******@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
| I have an ASP.NET page written in VB.NET that has a label:
|
| <asp:Label runat="server" ID="lblStatus"
| CssClass="LabelTxt"></asp:Label>
|
| In my code behind, I am running some stored procedures and a DTS
| package. Since the queries and the DTS package take a few seconds to | run, I want to update the status label after each step has completed: |
| lblStatus.Text = "Processing..."
| ' Process stored proc
| lblStatus.Text &= "Done!<br>"
| ' Process DTS package
| lblStatus.Text &= "Processing DTS Package...<br>"
| ' etc.
|
| I know that I can do this if I do not use code behind by just using
| Response.Write and Response.Flush() statements, as I would in classic | ASP.
|
| However, is there a way on the server side to raise an event and update | the label accordingly? Any pointers would be appreciated.
|
| Christian
|


Nov 19 '05 #3

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

Similar topics

1
4280
by: sekisho | last post by:
I'm dynamically adding a column of labels and a column of text boxes to a panel on a webform, based on data returned from an SQL query, which the user builds by selecting options from a few...
10
5780
by: sqlboy2000 | last post by:
Hello all, I have something very simple going on here and I'm scratching my head as to what the problem is. There are 4 items in my project, 2 webforms, a user control, and a module: ...
5
12486
by: Mark R. Dawson | last post by:
Hi all, I may be missing something with how databinding works but I have bound a datasource to a control and everything is great, the control updates to reflect the state of my datasource when I...
22
6388
by: Mal Ball | last post by:
I hope I have the right forum for this question. I have an existing Windows application which uses a SQL Server database and stored procedures. I am now developing a web application to use the same...
0
1363
by: Michael Kellogg | last post by:
I have a problem wherein a query that updates a GridView doesn't seem to really stay in sync with a label I have above the GridView. I have a GridView object that I'm updating with information...
4
8735
by: =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?= | last post by:
I setup a simple gridview as a utility just to do some updates, nothing fancy just wanted easy UI to make updates. When I select ‘Edit’, I get the fields I want to edit. I edit them and click...
3
1858
by: Trez | last post by:
Hey guys, Am new at using ASP.Net. am having some problems updating my SQL DB. whenever i try i get this Error. Can someone help me? Incorrect syntax near 'nvarchar'. Description: An unhandled...
0
1537
by: TheDebbis | last post by:
I'm making a quick CD catalog to help me learn ASP.NET (using C# primarily.) I have a number of gridview's on my site that are working properly, but for some reason, one is not updating or deleting....
4
1876
by: Edwin Velez | last post by:
http://msdn.microsoft.com/en-us/library/806sc8c5.aspx The URL above gives sample code for use within a Console Application. What I would like to do is use this code within a Windows Form. That...
2
5684
by: =?Utf-8?B?TUNN?= | last post by:
I have an asp.net page that contains an update panel. Within the update panel, controls get added dynamically. During partial page post backs the controls within the panel will change. I have a...
0
7199
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,...
0
7273
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,...
0
7322
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...
1
6982
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...
1
5000
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...
0
4667
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...
0
1501
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 ...
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
374
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...

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.