0
내가 HTML5 비디오 컨트롤 내 코드 플레이 비디오, 내 대구 잘 비디오를 재생하려면 않았다 않았다하지만 난 " 경로로 DB에 비디오를 저장하기 때문에 작동하지 않았다 ~/고해상도/파일/test.ogv "문제는"~/ "이었습니다. 따라서 코드 을 제거하여 비디오를 재생하려면"~/ "을 제거하십시오. 문제는 내가 "~/"을 바꿀 때입니다. HTML 컨트롤이 새로운 값을 보류하기를 원합니다.Datalist의 컨트롤을 새로운 값으로 바인딩하는 방법은 무엇입니까?
protected void DL_Media_ItemDataBound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
HtmlGenericControl video = e.Item.FindControl("vd") as HtmlGenericControl;
HtmlGenericControl source = e.Item.FindControl("source") as HtmlGenericControl;
string src = source.Attributes["src"].ToString();
if (src != null)
{
string x = "~/";
string y = " ";
string result = src.Replace(x, y);
src = result;
}
}
}