Below is my client code to define an asyncfileupload control of ajax control toolkit and a label which i want to change text of
<asp:AsyncFileUpload ID="AsyncFileUpload1" runat="server" OnUploadedComplete="AsyncFileUpload1_UploadedComplete" />
<label id="lbl">hello</label>
and below is my code behind event handler of upload complete
protected void AsyncFileUpload1_UploadedComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
{
if (AsyncFileUpload1.HasFile)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "LableText", "ChangeLableText();", true);
}
}
Here is my ChangeLableText function on client side
<script type="text/javascript">
function ChangeLableText() {
$("#lbl").html("Hello world");
alert("I have been Called");
}
I get the alert on client saying "I have been called" but I see no change in label text. I have tried placing the File upload and label inside an update panel but nothing seems to work for me. Any Help please.