I added the 'using...' and got:
C:\Program Files\Microsoft
SDK\Samples\security\PasswordFilters\PassFilt\WebPartLibrary4\PageView2.cs(11):
The type or namespace name 'Security' does not exist in the class or
namespace 'Microsoft.SharePoint' (are you missing an assembly reference?)
The dependency 'Microsoft.SharePoint.Dsp' could not be found.
The dependency 'Microsoft.SharePoint.Library' could not be found.
The dependency 'Microsoft.SharePoint.Security' could not be found.
the webpart I'm am trying to create is a pageviewer taken from the book:
----------- code begins below this line ------------
using System;
using System.ComponentModel;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml.Serialization;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.WebPartPages;
using Microsoft.SharePoint.Dsp;
using Microsoft.SharePoint.Library;
using Microsoft.SharePoint.Security;
namespace SpsPageView2
{
[DefaultProperty("URL"),
ToolboxData("<{0}:Container runat=server></{0}:Containder>"),
XmlRoot(Namespace="SpsPageView2")]
public class Container : Microsoft.SharePoint.WebPartPages.WebPart
{
private string url="";
private int pageHeght = 400;
[Browsable(true),Category("Miscellaneous"),DefaultValue(""),
WebPartStorage(Storage.Personal),
FriendlyName("URL"),
Description("The address of the page to display.")]
public string URL
{
get
{
return url;
}
set
{
url = value;
}
}
[Browsable(true),Category("Miscellaneous"),
DefaultValue(400),
WebPartStorage(Storage.Personal),
FriendlyName("Page Height"),Description("The height of the page in
pixels.")]
public int PageHeight
{
get
{
return PageHeight;
}
set
{
PageHeight = value;
}
}
protected override void RenderWebPart(HtmlTextWriter output)
{
output.Write("<div><iframe height='" + PageHeight +"' width='100%' src='"
+URL + "'></iframe></div>");
}
}
}