我把flash名存储在数据库中。为FlashName
后台代码:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
myConnection.Open();
GetAllCheckBox();
DisplayFlash();
}
}
private void DisplayFlash()
{
SqlCommand comm = myConnection.CreateCommand();
comm.CommandText = "Select FlashName from Answer where Id = 61";
comm.ExecuteReader();
}
前台:
<div>
<object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="500" height="200">
<param name="movie" value='Flash/<%#Eval("FlashName") %>' />
</object>
</div>
flash文件存储在Flash文件夹中,但是运行的时候不显示flash....
后台代码:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
myConnection.Open();
GetAllCheckBox();
DisplayFlash();
}
}
private void DisplayFlash()
{
SqlCommand comm = myConnection.CreateCommand();
comm.CommandText = "Select FlashName from Answer where Id = 61";
comm.ExecuteReader();
}
前台:
<div>
<object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="500" height="200">
<param name="movie" value='Flash/<%#Eval("FlashName") %>' />
</object>
</div>
flash文件存储在Flash文件夹中,但是运行的时候不显示flash....
<embed src='Flash/<%#Eval("FlashName")%>' wmode='opaque width=500 height=200'></embed>
先把结果保存到DataTable里,然后财<%=dt.row[0][0].ToString()%>