private void FillStream() { string str; SqlDataReader rd; str = " select * from tbl_TestInstruction, tbl_Paper "; str = str + " WHERE tbl_TestInstruction.Id1 = tbl_Paper.InstructionId "; str = str + " and PaperId=" + Session["PaperId"].ToString(); rd = c1.SelectDr1(str); if (rd.Read()) { lbl_PaperType.Text = rd["FixPaper"].ToString(); if (rd["InstructionType"].ToString() == "Text") { lbl_Instruction.Text = rd["TestInstruction"].ToString(); } else { img_Instruction.ImageUrl = rd["PhotoUrl"].ToString(); } } }