Make sure that the class defined in this code file matches the 'inherits' attribute, and that it ext

M

murl

I want to create a web user control with a base class of 'GridView' so
I can wrap the needed methods to make rows clickable. However when
building the project I get the following message:

"Make sure that the class defined in this code file matches the
'inherits' attribute, and that it extends the correct base class (e.g.
Page or UserControl)."

Markup:
<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="MerlinGridView.ascx.cs" Inherits="MerlinGridView" %>

CodeBehind:
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class MerlinGridView : GridView
{
}

If I change the base type of this control to be 'UserControl', the
project builds fine. Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top