Re: Mixing a client-side/server-side event

Tech-Archive recommends: Speed Up your PC by fixing your registry




"jonefer" <jonefer@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:C535769E-A672-4749-A73B-F2D0A2BC4ADF@xxxxxxxxxxxxxxxx
I'm hoping this is a classic question, but the answer to it would help me
with a lot of things.

As you can see below, this code will never display the "Getting data...." text
in the lblCheck - because it needs to do a round-trip to the server - first.
And when it gets back, my other routine will over-write the text as "34
records found"

Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnSearch.Click

Me.lblCheck.Text = "Getting data....."
SearchActionList()

End Sub

Don't hold me to it, but if you're using .Net 2.0, can't you use this?

Label1.Text = Server.HtmlEncode("Getting data.....")

I noticed it populated the label before it made the round trip when I pushed the Submit button.

.


Quantcast