string query_exp;
if (lblExhId.Text=="")
{
query_exp="Select ExhFrd,ExhTod,ExhPrg,ExhCmp,ExhInq,ExhLev,ExhCnt,E xhNot,ExhOwnId from Exh where ExhAnaId="+ Convert.ToInt32(Session["idana"]);
}
if(Session["prev-next"].ToString()=="next")
{
query_exp="Select ExhFrd,ExhTod,ExhPrg,ExhCmp,ExhInq,ExhLev,ExhCnt,E xhNot,ExhOwnId from Exh where ExhOwnId>"+ Convert.ToInt32(lblExhId.Text) +" and ExhAnaId="+ Convert.ToInt32(Session["idana"]);
}
if (Session["prev-next"].ToString()=="prev")
{
query_exp="Select ExhFrd,ExhTod,ExhPrg,ExhCmp,ExhInq,ExhLev,ExhCnt,E xhNot,ExhOwnId from Exh where ExhOwnId<"+ Convert.ToInt32(lblExhId.Text) +" and ExhAnaId="+ Convert.ToInt32(Session["idana"]);
}
SqlDataReader dr_exp;
SqlCommand cmd_exp=new SqlCommand(query_exp,conn);