【发布时间】:2012-11-04 06:53:32
【问题描述】:
大约一年以来,我每天都遇到对消息框的需求,我尝试了 jQuery 插件,JavaScripts alert 但仍然不确定哪种方式是最好的方式。
我想在 ASP.NET 页面(实际上是它的共享点应用程序页面)中显示一个消息框。
<%@ Page Language="C#" MasterPageFile="~/_layouts/abc/simple.master" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase" %>
<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Import Namespace="System" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
string a= aa(Request.UrlReferrer.ToString());
string b= bb(Request.UrlReferrer.ToString());
mm(a, b);
Uri uu= Request.UrlReferrer;
if (uu!= null)
Response.Redirect(uu.ToString());
System.Web.HttpContext.Current.Response.Write("alert(\"write here what you want\")");
}
现在它不起作用,但可能是一些语法错误,但是如果我想显示一个正确的消息框(例如 jquery 的插件 http://docs.jquery.com/UI/Dialog 以一种不刷新页面的方式)我能做什么做。
实际开发的是 SharePoint 文档库的自定义操作。
编辑
我已经解释过的内容摘要在 SharePoint 2007 I 中 必须开发/设计或使用大多数背后的消息框插件代码 时间(服务器端)例如在 C# 后面的 ASP.NET 代码中。现在我看到了 数十个问题要求,但实际上没有一个问题 根据最佳实践进行适当的解释。
【问题讨论】:
标签: c# asp.net sharepoint dialog custom-action