I have a master page with that code:
public string CallbackMethod;
protected void Page_Load(object sender, EventArgs e)
{
CallbackMethod = Page.ClientScript.GetCallbackEventReference(this, "message",
"Dodanie", "context", true);
}
/other code here/
then, in the View (which is based on that master page) I need to invoke the CallbackMethod string, but the problem is, the framework firstly renders the View, and then invokes the Page_Load method. As the obvious result, the error appears:
the name 'CallbackMethod' does not exist in the current context.
How do I fix this?