if(displayit){
login_div.Style["display"]="inline"; //the default display mode
}else{
login_div.Style["display"]="none";
}
Adding this code into Page_Load
should work. (if doing it at Page_Init you'll have to contend with viewstate changing what you put in it)