try
currentCounter.DataBind()
after you assign the new data to your counter
On Sat, 19 Jun 2004 08:20:20 +0200, "Svein Erik Storkaas"
[quoted text, click to view] <flusher@sensewave.com> wrote:
>Hi,
>I have a page that has 1 textbox, 1 button and 1 label. It is a page where
>you have to write your email address, then you can click on the button to
>download a program. When the button is clicked it updates a downloadcounter
>I have made. All works fine except it wont update the textlabel that shows
>the current number of the counter. If I refresh the page, it updates.
>
>I know that i can use onPreRender in a way...but I am wondering if it gets
>"destroyed" when i use a Response.Redirect("pathtothe-file")..?
>
>The problem is: How can i get the label updated after the buttonclick?
>
>I would REALLY appreciate a solution to my problem! :)
>Here is a sample of the code i use:
>
>private void cmdDownload_Click(object sender, System.EventArgs e)
> {
> int currentCounter;
> string email;
>
> email = txtEmail.Text;
> insEmailAddress(email);
> currentCounter = getCounter();
> updateCounter(currentCounter);
> currentCounter = getCounter();
>
> //I have tried to place it both before and after the
>Response.Redirect
> updateLabel(currentCounter);
>
> Response.Redirect("http://something_1.1.zip",false);
> }
>