0

So why when I add the line <%@ Import Namespace="Microsoft.Sharepoint" %> does the page error with:

An error occurred during the compilation of the requested file, or one of its dependencies. The type or namespace name 'Sharepoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

Here is the code:

<%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="System.Threading" %>
<%@ Import Namespace="Microsoft.Sharepoint" %>
<script language="C#" runat="server">
void Page_Load(){
  DateTime modified = File.GetLastWriteTime(@"_vti_bin/listdata.svc/Conversations");
  Response.Write(modified);
  /*while (modified == File.GetLastWriteTime(@"_vti_bin/listdata.svc/Conversations")){
    Thread.Sleep(10);
  }*/
  Response.Write("Change in HallPasses");
}
</script>

So what exactly am I doing wrong, I know I solved this problem at a previous job, I just forgot how. Help is much appreciated, thank you!

2

Looks like you're just spelling it wrong :))

<%@ Import Namespace="Microsoft.SharePoint" %>

"P" is capital :)

  • 1
    I'm an imbecile. Perhaps that's why I shouldn't work on projects this late :P – Vap0r Nov 1 '11 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.