ScriptManager is inaccessible

Tefloneddie

New Member
I am trying to invoke the js function implemented on the aspx page from a .cs class. But, ScriptManager doesn't seem to exist in .cs class. Basically, the .cs file is a part of dll that I am using in my project. I need to invoke the js function that is implemented on the aspx page, from my .cs file present in the dll.The js function is successfuly invoked from the aspx page, but when I try the same code in .cs file it says \[quote\] ScriptManager is inaccessible due to its protection level.\[/quote\]here is code I am trying\[code\]protected void MyMethod(){ ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "jsfunction();", true);}\[/code\]any ideas why the same code runs successfuly on the aspx page but not from a .cs class?
 
Back
Top