I have a custom aspx page in sharepoint sandboxed solution with the content as shown below?
<%@ Page Language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>
<asp:Content ID="Content1" ContentPlaceHolderId="PlaceHolderMain" runat="server">
Hi Doug.
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</asp:Content>
and the code behind:
namespace Microsoft.SharePoint.WebPartPages
{
public class SamplePage: System.Web.UI.Page
{
protected global::System.Web.UI.WebControls.Label Label1;
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = "I work just fine.";
}
}
}
Here I have changed the namespace to Microsoft.SharePoint.WebPartPages because sandbox solution is not accepting the project assembly "MyAssembly". I deployed the solution. but i cannot see the code behind SamplePage is not executing. An anyone please help me?
Note: I also perform the below action in javascript using which i want to step into the code behind samplepage.cs. But it never calls it.
$ajax
({ type: 'POST', dataType: "html", url: "http://server09/Style%20Library/sample/SamplePage .aspx",
beforeSend: function (xhr) {
xhr.setRequestHeader('command', 'ListsNames');
},
success: function (content) {
alert('sharmila');
}
});