我想在 SpItemEventReceiver
中显示一个确认框类仅使用 C# 或任何脚本或插件(例如 jQuery)。
我已经研究了这个问题,我相信我可以做一些事情,比如构建一个字符串并将它显示在这个项目添加表单上,但我在 this SharePoint King blog post 中读到了它(我不是在给他们做广告)如果你搜索文本是不可能的。以下是摘录:
Is there any way we can show a custom message box when an event is fired and continue with the event?
No, that is not possible from the method described here. You can put alert on button click of the form by the javascript but can not be done by an event handler.
我想知道是否有人可以确认是否可以或我们不能这样做,因为我认为我们可以但不知道如何做。这是我正在尝试的一段代码:
class className: SPItemEventReceiver
{
public override void ItemAdding(SPItemEventProperties properties)
{
try
{
this.DisableEventFiring();
//Display a Message box here
[编辑:] HttpContext.Response
属性是否可以在此上下文中工作?
最佳答案
显示消息框在这里不起作用;如果有效,消息框将显示在服务器上,因为这是运行此代码的地方。您可以在服务器端使用的是 SharePoint
页面状态MSDN
关于c# - SPItemEventReceiver 类中的确认框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13231270/