المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Casting a session object to a generic object



C# Programming
09-01-2010, 01:13 PM
Lets say you have code block like this

public void BindGridData(IEnumerable result)
{
Session["result"] = result;
gridView.DataSource = result;
gridView.DataBind();
}

How do you call this function in another event passing the Session["result"] as the argument?
How do you cast Session["result"] back to the generic object?

thanks