在InfoPath解决方案中的c#CSOM应用程序内部进行响应重定向 [英] Response Redirect inside of a c# CSOM app inside of InfoPath solution

查看:44
本文介绍了在InfoPath解决方案中的c#CSOM应用程序内部进行响应重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨:

我们已将InfoPath解决方案作为内容类型加载到文档库中.在此表单上,我们有几个图片按钮,后面带有C#代码.我们希望让按钮之一(关闭)不运行脚本,但 运行一些重定向到该网站根目录的代码:

代码是

公共无效Close_Clicked(对象发送者,ClientEventArgs e)

{

System.Web.HttpContext.Current.Response.Redirect(_rooturl,true);

}

获取对象引用未设置为对象错误的实例.

我们发现的所有文章都显示了以上语法.

非常感谢您的帮助.

最好的问候

查克

解决方案

我认为您无法在信息路径解决方案代码中重定向其他网址.


Hi:

We have an InfoPath solution loaded as a content type that is attached to a document library.  We have a couple of picture buttons on this form with C# code behind.  One of the buttons (CLOSE) we would like to get it to NOT run a script but to run some code that redirects to the root of this site:

Code is

Public void Close_Clicked(object sender, ClientEventArgs e)

{

System.Web.HttpContext.Current.Response.Redirect(_rooturl, true);

}

Get object reference not set to instance of object error.

All the articles we have found show the above syntax.

Would appreciate any help.

Best Regards

Chuck

解决方案

I don't think you can redirect other url in your infopath solution code.


这篇关于在InfoPath解决方案中的c#CSOM应用程序内部进行响应重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆