マイ データベース
Advertise.aspx
<asp:TemplateField HeaderText="Hình ảnh">
<ItemTemplate>
<asp:Image ID="imgHinhanh" ImageUrl='<%#Eval("adv_Url") %>' runat="server"></asp:Image>
</ItemTemplate>
</asp:TemplateField>
Advertise.apx.cs
public void BindGrid() {
grdAdver.DataSource = AdvertiseService.adv.Adver_GetAll();
grdAdver.DataBind();
}
AdvertiseService.cs
public List<AdvertiseInfo> Adver_GetAll()
{
return adv.Adver_GetAll();
}
AdvertiseInfo.cs
public partial class AdvertiseInfo
{
public int adv_id { get; set; }
public string adv_Name { get; set; }
public string adv_Url { get; set; }
public int? adv_Width { get; set; }
public int? adv_Height { get; set; }
public string adv_Link { get; set; }
public int? adv_Target { get; set; }
public int? adv_Position { get; set; }
public int? adv_Order { get; set; }
public int? adv_Status { get; set; }
}
私を助けてください。修正するのに長い時間を無駄にしましたが、できません。誰にでも感謝します。