string query = "SELECT distinct(pdfname) FROM feeder where div='" + DropDownList2.Text + "' and grid='" + DropDownList3.Text + "' and feeder='" + DropDownList4.Text + "' ";
DataTable dt1 = new DataTable();
dt1 = cs.display(query);
if (dt1.Rows.Count > 0)
{
string pdf1 = dt1.Rows[0]["pdfname"].ToString();
// Iframe1.Attributes.Add("src", "pdf/"+dt1.Rows[0]["pdfname"].ToString());
//string szPdfPath = Server.Mappath("D:\\test.pdf");
string pdf2=Server.MapPath("pdf/"+pdf1);
//Iframe1.Attributes.Add("src", "pdf/" + pdf1);
Iframe1.Attributes.Add("src",pdf2);
}
help needed...

Sunny SharmaPosted Oct 24, 2013, 2:06 AM
Put breakpoint in your code and check if the values are getting returned properly for every attribute.