mj
Guest
|
Posted:
Tue Jan 11, 2005 2:22 pm Post subject:
Using an aspx page with SPS site |
|
|
Hi,
I have created an aspx file, and put it into the ..\template\layouts\1033\
directory, but when I access it using http://xxx/_layouts/xxx.aspx, IE
report that there is no such file. I have also put it into the SPS site
using Front Page, but when I browse it, IE report that there are script that
have not been supported, any solution for this?
code as below(xxx.aspx):
<%@ Page language="C#" EnableViewStateMac="false" %>
<%@ Register Tagprefix="SharePoint"
Namespace="Microsoft.SharePoint.WebControls"
Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<script runat="server">
void Page_Load()
{
SPWeb web = SPControl.GetContextWeb(Context);
string strPath = Request.QueryString["FileName"];
SPFile file=web.GetFile(strPath);
if (file.Exists)
{
file.Item.ModerationInformation.Status =
SPModerationStatusType.Pending;
file.Item.Update();
}
else
{
Response.Write("无法将文件提交给经理审批!");
}
}
</script> |
|