I have this method, called (post back) by a LinkButton on client side, by an user:
protected void myOwnMethod_Click(object sender, EventArgs e)
{
myObject.Word = "Word";
}
well, myObject must be already instantiate before, so it must be accesible here and after (at the Page_Load state).
In fact, instantiate it at Page_Load I get
“System.NullReferenceException: Object reference not set to an
instance of an object.”
If an object has to be recreated every postback, your best bet is to instantiate it in
Page_InitNote: if the dynamically created object has/uses viewstate, it should be restored after
Page_Initautomatically. Eg: a textbox retains it’s value.