UpdatePanel with Javascript

Posted by Santoshkumar under ASP.NET AJAX on 5/8/2011 | Points: 10 | Views : 2926 | Status : [Member] | Replies : 2
<script runat="server">
protected void btnDeleteAll_Click(object sender, EventArgs e)
{
if (FileHelper.DeleteAll() == true)
{
string script = @"alert('All Files Deleted Successfully!');";
ScriptManager.RegisterStartupScript(this, this.GetType(),"filesDeleted", script, true);
}
}
</script>


when i am executing FileHelper does not exist in the current context is comming. plz help me.




Responses

Posted by: SheoNarayan on: 5/9/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Looks like you are facing problem while you are keeping JavaScript content inside UpdatePanel.

Read this article http://www.dotnetfunda.com/articles/article471-jquery-and-aspnet-ajax-updatepanel-.aspx.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Santoshkumar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response