日期:2014-05-20 浏览次数:20950 次
<asp:Image ID="Image1" runat="server" Height="107px"
ImageUrl='<%#DataBinder.Eval(Container.DataItem,"url") %>'
Width="130px" />
</td>
</tr>
<tr>
<td>
<a href='44.aspx?pname=<%# DataBinder.Eval(Container.DataItem,"pname") %>' style="font-size: 12pt; text-decoration:none">
<%# DataBinder.Eval(Container.DataItem,"pname") %></a>
if (!IsPostBack)
{
string idStr =Request.Params["pname"].ToString();
SqlConnection sqlconn = sqlCon.getCon();
sqlconn.Open();
string sqlstrbind = "select * from product where pname='" + idStr + "'";
SqlCommand sqlcom = new SqlCommand(sqlstrbind, sqlconn);
SqlDataReader sdr = sqlcom.ExecuteReader();
if (sdr.Read())
{
TextBox1.Text = sdr["details"].ToString();
Label4.Text = sdr["pname"].ToString();
Image1.ImageUrl = sdr["url"].ToString();
}
sdr.Close();