我正在使用此代码部分为我的 ASP.net 网站上传视频。但它给出了这样的错误“mySrc 由于它的保护级别而无法访问”我该如何解决它
protected void Button1_Click(object sender, EventArgs e)
{
try
{
playSound();
}
catch (Exception ex)
{
Response.Write("Error in Page:" + ex.Message);
}
}
public void playSound()
{
mySrc = @"http://google.com//alarm.wav";
}
页面
<asp:panel id="Panel1" runat="server" height="1px" width="1px" xmlns:asp="#unknown">
<object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="player">
class="style3" height="1px" width="1px" >
<param name="url" value="<%=mySrc %>" />
<param name="src" value="<%=mySrc %>" />
<param name="showcontrols" value="true" />
<param name="autostart" value="true" />
<!--[if !IE]>-->
<object type="video/x-ms-wmv" data="<%=mySrc %>" class="style4" height="1px" width="1px">
<param name="src" value="<%=mySrc %>" />
<param name="autostart" value="true" />
<param name="controller" value="true" />
</object>
<!--<![endif]-->
</object>
</asp:panel>