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

A bit of a back story - I am trying to create a custom dispform page for my list in VS2010. I used instructions found here to do it. I successfully created the custom form and had the site loading it instead of the default, but am now getting stuck while adding a code behind page. I am 99% sure the issue is with my namespace and inheritance on the asp page, but I can't for the life of me figure out the issue. I was hoping someone out her can. Here's my code:

<%@ Page language="C#" CodeBehind="DispRequest.aspx.cs" MasterPageFile="~masterurl/default.master" Inherits="Solvera.SellIT.DispRequest.Solvera.SellIT,Version=1.0.0.0,Culture=neutral,PublicKeyToken=24e9d7d011937483"  %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

And from the code behind file which is named disprequest.aspx.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using Microsoft.SharePoint.WebPartPages;


namespace Solvera.SellIT
{
class DispRequest:WebPartPage
{
    protected Button btnSubmitOffer;
    protected TextBox txtOfferAmount;

I would greatly appreciate any help anyone can provide.

Thank you,

share|improve this question
    
check this link out, stackoverflow.com/questions/1717814/… –  Muhammad Raja Feb 15 '13 at 13:56

1 Answer 1

up vote 0 down vote accepted

You have Inherits="Solvera.SellIT.DispRequest.Solvera.SellIT,Version=1.0.0.0,...

What you probably want is Inherits="Solvera.SellIT.DispRequest, Solvera.SellIT,Version=1.0.0.0,...

Where Solvera.SellIT.DispRequest is the fully qualified name of your class, and Solvera.SellIT is the name of the assembly.

You might also need spaces after each comma in the Inherits string, not sure if it matters but that's how mine look.

share|improve this answer
    
I tried your suggestion and received the following error: Could not load the assembly 'Solvera.SellIT,Version=1.0.0.0,Culture=neutral,PublicKeyToken=24e9d7d011937483'‌​. Make sure that it is compiled before accessing the page. –  HawkeyeD Feb 15 '13 at 19:20
    
I also forgot to mention that my DispRequest also exists inside a module called Forms. Does this affect the inherits declaration? –  HawkeyeD Feb 15 '13 at 19:51
    
Did you try with the spacing after the commas, like how the Microsoft assemblies look? –  lgaud Feb 15 '13 at 19:57
    
Thanks for your reply. I did try that. I modified my statement as follows: Inherits="Solvera.SellIT.DispRequest, Solvera.SellIT, Version=1.0.0.0, Culture=neutral, PublicKeyToken=24e9d7d011937483" with spaces after the commas. This is very frustrating since I believe it should be working. I would appreciate any other suggestions you might have. –  HawkeyeD Feb 15 '13 at 20:14
    
I also tried just removing the assembly and just left it as Inherits="Solvera.SellIT.DispRequest" %> but that changed the error to "Could not load type 'Solvera.SellIT.DispRequest' –  HawkeyeD Feb 15 '13 at 20:16

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.