Your question is not clear,I think you want to hide hyperlink if session have or not have value.use as
Use
if(Session["userid"]==null)
{
HyperLink1.Visible=false;
}
use on pageload of contentpage
((HyperLink)this.Master.FindControl("HyperLink1")).Visible=false;