<script type="text/javascript">

var action = GetUrlKeyValue('accountname').toLowerCase();

var loginName = "<%= Microsoft.SharePoint.SPContext.Current.Web.CurrentUser.LoginName.ToString().Replace('\\', '/').ToLower() %>";

if((action.replace("\\","/")== loginName))

{

代码块

}else if(action == '')

{

代码块

 

}else{

代码块

 

}

 

    </script>

 

 

需要修改webconfig文件

<PageParserPaths>        

 <PageParserPath VirtualPath="/_catalogs/masterpage/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true" />         <PageParserPath VirtualPath="/my/_catalogs/masterpage/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true" />       </PageParserPaths>

posted on 2012-03-12 20:09    阅读(266)  评论(0编辑  收藏  举报