其实就是读数据库, 判断这条新闻码有没有视频 或音频, 然后显示或不显示,再 asp.net里用的panel
经历让我在asp里实现这个功能, 以下是asp.net的代码,能帮我改成asp的吗,我估计asp里要用div代替panel了吧
if (paths != "")
{
if (videoType == "music" || videoType == "")
{
try
{
if (System.IO.Directory.Exists(Server.MapPath("/upfile/sound/" + paths + "/")))
{
this.plSound.Visible = true;
}
}
catch
{ }
}
if (videoType == "video")
{
plVideo.Visible = true;
}
}
下面是aspx里的音频,其实就是2个 panel, 在.cs里判断有没有,再决定是否显示----帮我改成asp的,谢谢而来 <!--音频播放begin-->
<asp:Panel ID="plSound" runat="server" Visible=false>
<iframe src="soundPlay.aspx?paths=<%=paths %>&pg=<%=isPage %>" width=225 height=230 frameborder=0 scrolling=no ></iframe>
</asp:Panel>
<!--音频播放end-->
<!--视频播放begin-->
<asp:Panel ID="plVideo" runat="server" Visible="false">
<iframe src="/VideoPlay.aspx?paths=<%=paths %>&pg=<%=isPage %>" width="300px" height="255px" frameborder="0" scrolling="no" ></iframe>
</asp:Panel>
<!--视频播放end-->
经历让我在asp里实现这个功能, 以下是asp.net的代码,能帮我改成asp的吗,我估计asp里要用div代替panel了吧
if (paths != "")
{
if (videoType == "music" || videoType == "")
{
try
{
if (System.IO.Directory.Exists(Server.MapPath("/upfile/sound/" + paths + "/")))
{
this.plSound.Visible = true;
}
}
catch
{ }
}
if (videoType == "video")
{
plVideo.Visible = true;
}
}
下面是aspx里的音频,其实就是2个 panel, 在.cs里判断有没有,再决定是否显示----帮我改成asp的,谢谢而来 <!--音频播放begin-->
<asp:Panel ID="plSound" runat="server" Visible=false>
<iframe src="soundPlay.aspx?paths=<%=paths %>&pg=<%=isPage %>" width=225 height=230 frameborder=0 scrolling=no ></iframe>
</asp:Panel>
<!--音频播放end-->
<!--视频播放begin-->
<asp:Panel ID="plVideo" runat="server" Visible="false">
<iframe src="/VideoPlay.aspx?paths=<%=paths %>&pg=<%=isPage %>" width="300px" height="255px" frameborder="0" scrolling="no" ></iframe>
</asp:Panel>
<!--视频播放end-->
<% paths = oQuery("soundUrl")
videoType = oQuery("soundUrl_type") if paths != "" then
if videoType == "music" || videoType == "" then if Server.MapPath("/upfile/sound/" + paths + "/")!="" then
this.plSound.Visible = true
end if
end if
if videoType == "video" then
plVideo.Visible = true;
end if
end if
<!--音频播放begin-->
<div ID="plSound" runat="server" Visible=false style="width:295px; height:250px;">
<iframe src="soundPlay.aspx?paths=<%=paths %>&pg=<%=isPage %>" width=225 height=230 frameborder=0 scrolling=no ></iframe>
</div>
<!--音频播放end-->
<!--视频播放begin-->
<div ID="plVideo" runat="server" Visible="false" style="width:295px; height:250px;">
<iframe src="/VideoPlay.aspx?paths=<%=paths %>&pg=<%=isPage %>" width="300px" height="255px" frameborder="0" scrolling="no" ></iframe>
</div>
<!--视频播放end-->
---------^
vst="display:none"
Set fs = server.CreateObject("scripting.filesystemobject") if paths<>"" and len(paths)>0 then
if videoType="music" or videoType="" then
filename = Server.MapPath("1.html")
if fs.FileExists("/upfile/sound/"&paths&"/") then
vst="display:block"
else
vst="display:none"
end if
end if
end if %>
<div ID="plSound" style="width:295px; height:250px;<%=vst %>">
<iframe src="soundPlay.aspx?paths=<%=paths %>&pg=<%=isPage %>" width=225 height=230 frameborder=0 scrolling=no ></iframe>
</div>
<!--音频播放end-->
<!--视频播放begin-->
<div ID="plVideo" style="width:295px; height:250px;<%=vst %>">
<iframe src="/VideoPlay.aspx?paths=<%=paths %>&pg=<%=isPage %>" width="300px" height="255px" frameborder="0" scrolling="no" ></iframe>
</div>
这个不要了