avatar
image with RadioButtonList c## DotNet - 窗口里的风景
A*n
1
I have a table, it include image name and image.(I save the image to the
database).
I get the image from the database, but how can I bind the image to the
radiobuttonlist? (note: I save the image to the database not folder, so no
image path)
my Code:

var queryforlogo = from a in context.Logoes
where a.DataBaseGroupId == gt.DataBaseGroupId
select a;
if (queryforlogo.Count() > 0)
{
foreach(Logo logo in queryforlogo)
{

byte[] data = logo.Image;
rblLogo.Items.Add(new ListItem(String.Format("<
img scr='{0}'>",data)));

}
}
I think "rblLogo.Items.Add(new ListItem(String.Format("",data
)));
" is not working.
any idea?
Thanks
avatar
x*n
2
You need to create a service to return the image, and point to its url.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。