如何添加到radconfirm消息的链接

时间:2013-10-15 16:23:36

标签: asp.net telerik

我想添加指向另一个页面的超链接作为文本到radconfirm。如果删除了超链接但代码工作正常,但确认窗口永远不会显示。

请找到以下代码:

    strLink = "\conditions\terms.aspx"

    strMsg += "are you Sure?"
    strMsg += "<br/>"
    strMsg += "<i>"
    strMsg += "please check conditions"
    strMsg += "<a href='" + strLink + "' target='_blank'>"
    strMsg +=  "here" + "</a>"
    strMsg += "</i>"

radWindowMngr.RadConfirm(strMsg,&#34; Update&#34;,330,100,Nothing,&#34;&#34;)

1 个答案:

答案 0 :(得分:0)

我尝试使用您的代码,但无法复制此问题。

<head runat="server">
    <title></title>
    <script>
        function opnePopup() {
            var strLink = "\conditions\\terms.aspx"

            var strMsg = "are you Sure?"
            strMsg += "<br/>"
            strMsg += "<i>"
            strMsg += "please check conditions "
            strMsg += "<a href='" + strLink + "' target='_blank'>"
            strMsg += "here" + "</a>"
            strMsg += "</i>"
            radconfirm(strMsg, confirmCallBackFn, 330, 180, null, 'Client RadConfirm', '');
            return false;
        }

        function confirmCallBackFn(args) {
            alert(args);
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div>


            <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
            <telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager>
            <button style="width: 200px;" onclick="return opnePopup();">
                radconfirm from client</button>
        </div>
    </form>
</body>
</html>

注意:请在URL(strLink)中使用双斜杠。

enter image description here enter image description here