asp.ent(c#) dropdownlist 无刷新更换头像的问题
在CS里是这么写的。。可是却不能更新protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
BindDropDownList();
}
private void BindDropDownList()
{
DirectoryInfo di = new DirectoryInfo(Server.MapPath("image/face/"));
FileInfo[] fi = di.GetFiles("*.jpg");
foreach (FileInfo f in fi)
{
dropface.Items.Add(new ListItem(f.Name, "image/face/" + f.Name));
ttxt.Text += "image/face/" + f.Name + '\n';
}
dropface.Attributes.Add("onchange", "documnet.getElementByld('imgface').src=documnet.getElementByld('" + dropface.ClientID + "').value; ");
}