【问题标题】:HyperLink popup with parameter in asp.net在 asp.net 中带有参数的超链接弹出窗口
【发布时间】:2017-07-29 15:01:01
【问题描述】:

当我点击一个超链接时,我想用它打开一个弹出窗口。我该怎么做?

我的超链接是这样的:

<asp:HyperLink ID="hplToplamBegeni" runat="server" NavigateUrl='<%# "../Yazar/PostLikes.aspx?PostID="+ Eval("PostID") %>'></asp:HyperLink>

【问题讨论】:

标签: c# asp.net hyperlink popup


【解决方案1】:

这个使用 javascript 的超链接应该适合你。

<asp:HyperLink runat="server" ID="hplToplamBegeni" Text="popup"
NavigateUrl='<%# String.Format("../Yazar/PostLikes.aspx?PostID={0}", Eval("PostID"))%>' 
      onclick="javascript:w= window.open(this.href,'PostID',
     'left=20,top=20,width=1500,height=300,toolbar=0,resizable=0');return false;">
</asp:HyperLink>

如果还有其他问题。检查输入的url路径是否正确,PostID是否正确使用。

【讨论】:

    【解决方案2】:
    猜你喜欢
    • 1970-01-01
    • 2020-05-02
    • 1970-01-01
    • 2018-09-21
    • 2013-11-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多