在MVC4中使用iframe元素嵌入Commerce Manager

在MVC4中使用iframe元素嵌入Commerce Manager,iframe,Iframe,我与一个商业经理,我需要能够嵌入他们的支付系统与我的MVC4项目 下面是示例代码 <iframe id="sFrame" width="200" height="300" src="<%=request.getContextPath()%>https:/comManager.com/pay_school/rce_manager/payer.do?order=s_cart&contentEmbedded=true" frameborder="yes" scrolling=

我与一个商业经理,我需要能够嵌入他们的支付系统与我的MVC4项目

下面是示例代码

<iframe id="sFrame" width="200" height="300" src="<%=request.getContextPath()%>https:/comManager.com/pay_school/rce_manager/payer.do?order=s_cart&contentEmbedded=true" frameborder="yes" scrolling="no">
</iframe>

我试过了,但运气不好更新代码如下----


与.net中的java
getContextPath()
等价的是
System.Web.HttpContext.Current.Request.ApplicationPath
,而不是
urlReferer.Host


根据你的建议,我更新了上面的代码。我现在得到这个错误“一个潜在危险的请求。从客户端(:)检测到路径值”,请参阅屏幕截图。顺便说一句,在乞讨处添加@标志是MVC的事情,与
<iframe id="sFrame" width="200" height="300" src="@System.Web.HttpContext.Current.Request.ApplicationPath https:/comManager.com/pay_school/rce_manager/payer.do?order=s_cart&contentEmbedded=true" frameborder="yes" scrolling="no">
    </iframe>