Register directive for custom web control in VS 2005 Beta 2

Discussion in 'ASP .Net Web Controls' started by mpao@mc-europe.com, Jul 4, 2005.

  1. Guest

    I'm trying to write some basic forms using VS 2005 Beta 2, and have a
    need for dropdownlists where the texts are localized both in and out.
    I'm thinking the best way to accomplish this is to write a custom
    dropdownlist that does the localizing on-the-fly. What I have written
    is a web control library that contains a class like this:

    Namespace MCE.WebControls

    Public Class TranslatedDropDownList
    Inherits Web.UI.WebControls.DropDownList

    [...]
    End Class

    End Namespace

    I have then compiled and deployed the DLL to my ASP .NET project. My
    register directive looks like this:

    <%@ Register TagPrefix="mce" Namespace="MCE.WebControls"
    Assembly="MCE.WebControls" %>

    Upon attempting to use the control in the .aspx page, I get the warning
    "The active schema does not support the element". I know this is a
    known issue with IntelliSense not having the correct schema
    information. The problem is, all the articles on this topic talk about
    updating asp.xsd, which doesn't exist anywhere on my dev machine. Has
    the procedure been changed in VS 2005 Beta 2? I can't compile the
    project so the component won't work until I presumably fix the schema.

    Also, as much as I love inheriting and writing custom controls, maybe
    there's a better way to do this?

    Toni
    , Jul 4, 2005
    #1
    1. Advertising

  2. Teemu Keiski Guest

    Hello,

    in fact VS.NET 2005 should be able to get the schema automatically without
    external XSD file (it uses reflection to dig that from the
    referenced/registered assembly). At least it has worked with my control
    projects, I've tried with it. Inspired by your question I tried it again and
    it does work for me. I have separate Web Control Library project which I use
    on a web project.

    --
    Teemu Keiski
    ASP.NET MVP, AspInsider
    Finland, EU
    http://blogs.aspadvice.com/joteke
    Teemu Keiski, Jul 8, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sergey Polyakov
    Replies:
    0
    Views:
    383
    Sergey Polyakov
    May 24, 2004
  2. Dan
    Replies:
    3
    Views:
    586
    =?Utf-8?B?RGFu?=
    Jun 14, 2004
  3. =?Utf-8?B?UGF1bCBQcmV3ZXR0?=

    Null Reference Exception on @Register Directive

    =?Utf-8?B?UGF1bCBQcmV3ZXR0?=, Sep 27, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    299
    =?Utf-8?B?UGF1bCBQcmV3ZXR0?=
    Sep 27, 2006
  4. Tim Burkart
    Replies:
    0
    Views:
    754
    Tim Burkart
    Feb 10, 2008
  5. Pavan
    Replies:
    1
    Views:
    367
    Paul Glavich [MVP ASP.NET]
    Jul 14, 2005
Loading...

Share This Page