Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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!

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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

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

"P" is capital :)

share|improve this answer
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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