473,795 Members | 2,929 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="Label Txt"></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 3934
its done the same way in .net. turn off buffering, and do response write,
response flush.

-- bruce (sqlwork.com)
<ka******@hotma il.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
| I have an ASP.NET page written in VB.NET that has a label:
|
| <asp:Label runat="server" ID="lblStatus"
| CssClass="Label Txt"></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******@hotma il.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
| I have an ASP.NET page written in VB.NET that has a label:
|
| <asp:Label runat="server" ID="lblStatus"
| CssClass="Label Txt"></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
4345
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 dropdowns and hitting the 'Search' button. The first column returned is a user name and is added to the panel as a label, the second is a number and is added to the label as the text property of a textbox, so the user can update it. When the...
10
5824
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: WebForm1.aspx ChangeValue.aspx WebUserControl1.ascx Module1.vb
5
12532
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 update the datasource - awesome, but I have an issue with updating from a different thread. Here is my datasource, a person class that raises the PropertyChanged event: class Person : INotifyPropertyChanged {
22
6433
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 database. The original Update and Delete SP's all use a timestamp for concurreny checking. I am trying to use the same Update SP from my sqlDataSource but I keep getting the following error:
0
1378
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 whenever my user enters a job number into a textbox and hits a button. There is a SQLDataSource object on the page that does the retrieval of the data, and the job number parameter for its query is bound to the textbox "Text" value. In the button...
4
8762
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 ‘Update’, the page returns to its original state (prior to clicking Edit) and no updates occur in the DB. What am I missing? I included the html code below. -- Thank-you, Barbara Alderton <body>
3
1883
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 exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax...
0
1556
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. I have the buttons for both visible, and when I click edit, the update fields show up properly, but once I click 'update' the table is back with it's old information. When I click 'delete' the page completes the postback properly, but once again, the...
4
1888
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 part is easy. The part that I am having trouble with is using the code in a form and having a Label's Text property update as a new directory or file is found. What I keep getting is the work being done before it is shown to the user via the...
2
5719
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 javascript function that uses the ClientID of the dynamic controls to perform certain operations on the client-side. With each partial page post back, I dynamically recreate the javascript function using the ClientIDs of the newly added controls....
0
9522
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,...
0
10448
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10167
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,...
0
10003
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7544
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
6784
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
5440
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...
1
4114
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
3730
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.