Problem using a costum server control in a aspx

Posted by gre3ns0ul on Stack Overflow See other posts from Stack Overflow or by gre3ns0ul
Published on 2010-05-20T09:57:20Z Indexed on 2010/05/20 10:00 UTC
Read the original article Hit count: 151

Hi guys, i am having a issue.

I already developed one class (my custom gridview) and i want use it on a .aspx That class is defined in app_code and compiled to the dll of the project.

namespace MyCostumControls{
  public class DropDownPagingGridView : GridView{ ...

I already registered the control on the aspx page using

<%@ Register Namespace="MyCostumControls" TagPrefix="ctrl" %>

and i can use in the page

and works ok.. But i'm watching one problem.

That class contains methods defined by me, than when i try to call them in code-behind sayd to me than they're not defined.

In designed i don't see the reference to MyCostumControls, and when i try declare one field using

protected global::MyCostumControls.MyCostumControls ddl_gv_errors,

i cannot access to MyCostumControls namespace,

Is because he's compiled to the project dll?

I can access to all namespaces than are not contained in app_code.

Solutions?

Apreciate. Thanks

© Stack Overflow or respective owner

Related posts about .NET

Related posts about custom-server-controls