• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 341
  • Last Modified:

Update asp:Label on web page during for / next loop in code behind

During a for / next in the code behind, I want to update a label on the page with a counter, kind of like:

    Number of records processed: xx

Inside the loop i put a textbox1.text = counter, and counter is being incremented.  Nothing shows up on the page until AFTER the process is compelted.  BTW - i'm using VB.net.

I feel stupid ... HELP!

Cheers,

Gp.
0
timbersnow
Asked:
timbersnow
1 Solution
 
Sammy AgeilCommented:
you wont see it until the loop is done because your code is ran on the server
if you want to see the label value increments you will need to use a client side javascript
 
0
 
chinu1310Commented:
what do you mean by  record processed ? What kind of process is that ?
0
 
timbersnowAuthor Commented:
i'm doing some geocoding (Lat/Long) on specific addresses.  For each address in the table (MSSQL), i do a address lookup and update that records Lat / Long, and then NEXT ...

I want to show a counter and maybe a Processing Address: xxx, xxx on the page.

Gp.
0
 
makzeeCommented:
Use Ajax.Net, It will help you get the desired result. Place your Label in <asp:UpdatePanel />.

Go to http://ajax.asp.net/ for more information on using Ajax.Net

Regards,
Zeeshan Q. Ali
Sr. Software Engineer, Folio3 Pvt. Ltd.,
Karachi, Pakistan
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now