现在有xx.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{ if (IsPostBack)
{
if (Request.QueryString["mode"] != null)
{
string User = Request.QueryString["mode"].ToString();
}
}
else
{
Outputjs();
}
}
private override void Outputjs(HtmlTextWriter output)
{
output.Write("<script type=\"text/javascript\">flowplayer(\"player\", \"./flowplayer-3.2.7.swf\"); </script>");
output.Write("<a id=\"flash_index\" href=\"http://localhost:4476/SampleWebsite/Fox_index.flv\" style=\"display:block;width:886px;height:659px\" id=\"player\"></a> ");
} 想在页面Page_Load的时候判断是否是回传 如果不是的话 就调用下面的函数 输出页面Html代码
protected void Page_Load(object sender, EventArgs e)
{ if (IsPostBack)
{
if (Request.QueryString["mode"] != null)
{
string User = Request.QueryString["mode"].ToString();
}
}
else
{
Outputjs();
}
}
private override void Outputjs(HtmlTextWriter output)
{
output.Write("<script type=\"text/javascript\">flowplayer(\"player\", \"./flowplayer-3.2.7.swf\"); </script>");
output.Write("<a id=\"flash_index\" href=\"http://localhost:4476/SampleWebsite/Fox_index.flv\" style=\"display:block;width:886px;height:659px\" id=\"player\"></a> ");
} 想在页面Page_Load的时候判断是否是回传 如果不是的话 就调用下面的函数 输出页面Html代码
解决方案 »
- while用法,如何先执行后判断?
- 如果用repeater实现这样的绑定样式
- div的问题
- DropDownList 添加一个“-请选择-”选项的困惑
- repeater嵌套里显示单选和多选框,请大家帮忙,谢谢!!!!
- /图片转换 急
- 关于运行的问题,
- 放100分!!!大家看DOTTEXT博客系统这一块分页程序该怎么写啊,你们看有什么好的想法.
- 我是初学者,关于页面访问的简单问题,急
- 请问双倍高手们:ASP与ASP.NET的Sesion间能会话吗,就是相互存取数据吗? 高分请教,急急......
- FileUpload1.PostedFile.SaveAs(path)这里的path到底应该些什么才能上传的服务器
- 求教一个Jquery当中的keyup事件!
strJS.Append("<script type=\"text/javascript\">flowplayer(\"player\", \"./flowplayer-3.2.7.swf\"); </script>");
strJS.Append("<a id=\"flash_index\" href=\"/SampleWebsite/Fox_index.flv\" style=\"display:block;width:886px;height:659px\" id=\"player\"></a>");
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), strJS.GetHashCode().ToString(), strJS, true);
试试
的第三个参数要不要加上.tostring()
<form id="form1" runat="server">
<div>
<asp:Button ID="btnPostBack" runat="server" Text="PostBack" />
<a href="/SampleWebsite/Fox_index.flv" style="display:none;width:886px;height:659px;" id="player"></a>
</div>
<input type="hidden" id="hidPB" runat="server" value="0" />
</form>
<script type="text/javascript">
function flowplayer(param1,param2){
}
var pb = document.getElementById("<%= hidPB.ClientID %>").value;
if(pb=="0"){ //0表示非回发状态
document.getElementById("player").style.display="block";
flowplayer("player", "./flowplayer-3.2.7.swf");
}
</script>
protected void Page_Load(object sender, EventArgs e)
{
if(IsPostBack)
hidPB.Value = "1";
}
怎么解决?