I get this error message when using ScriptManager in codebehind:
CS0103: The name 'ScriptManager' does not exist in the current context
This code is run within a shared hosting environment with AJAX. I thought ScriptManager would be available in the System.Web.UI namespace. Is this true? Do I need to declare the control as a variable in the SBAClass? Should I add a ScriptManager control to the aspx page? Here is my code in codebehind:
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.OleDb;
namespace SBASpace
{
public class SBAClass : Page
{
protected System.Web.UI.WebControls.Panel Panel0;
protected System.Web.UI.WebControls.Panel Panel1;
protected System.Web.UI.WebControls.Panel Panel2;
protected System.Web.UI.WebControls.Panel Panel3;
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
ScriptManager.RegisterClientScriptBlock(this, GetType(), "HideShowControls", "return HideShowControls0();", true);
}
}
}
}