Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem to use a VB.NET Custom Control in the same assembly

Problem to use a VB.NET Custom Control in the same assembly

Scheduled Pinned Locked Moved ASP.NET
csharphelpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Stephan Pilz
    wrote on last edited by
    #1

    Hello, I try to implement a custom control in VB.NET and instanciate this in a Page in the same project. I don't get any errors but I don't see my control. All examples that I can find have the custom control in a separate assembly with a separate project and mostly the custom control is programmed in C#. Is there a possibility for use the custom control in the same project and the same assembly? Please help me and note, that I'm not a C#-Programmer. Here comes more informations: - the cc-source is in MyCC.vb in Testproject - the cc-class is named MyOwnControl - I register the cc with <%@ Register TagPrefix="MYCC" NameSpace="Testproject" Assembly="Testproject" %> in a page in Testproject too. - I instanciate the cc with <MYCC:MyOwnControl id="moc" visible="true"></MYCC:MyOwnControl> Best regards Stephan

    I M 2 Replies Last reply
    0
    • S Stephan Pilz

      Hello, I try to implement a custom control in VB.NET and instanciate this in a Page in the same project. I don't get any errors but I don't see my control. All examples that I can find have the custom control in a separate assembly with a separate project and mostly the custom control is programmed in C#. Is there a possibility for use the custom control in the same project and the same assembly? Please help me and note, that I'm not a C#-Programmer. Here comes more informations: - the cc-source is in MyCC.vb in Testproject - the cc-class is named MyOwnControl - I register the cc with <%@ Register TagPrefix="MYCC" NameSpace="Testproject" Assembly="Testproject" %> in a page in Testproject too. - I instanciate the cc with <MYCC:MyOwnControl id="moc" visible="true"></MYCC:MyOwnControl> Best regards Stephan

      I Offline
      I Offline
      Ista
      wrote on last edited by
      #2

      I had the same problem. just separate the control into a web library control I'm not an expert yet, but I play one at work. Yeah and here too.

      1 Reply Last reply
      0
      • S Stephan Pilz

        Hello, I try to implement a custom control in VB.NET and instanciate this in a Page in the same project. I don't get any errors but I don't see my control. All examples that I can find have the custom control in a separate assembly with a separate project and mostly the custom control is programmed in C#. Is there a possibility for use the custom control in the same project and the same assembly? Please help me and note, that I'm not a C#-Programmer. Here comes more informations: - the cc-source is in MyCC.vb in Testproject - the cc-class is named MyOwnControl - I register the cc with <%@ Register TagPrefix="MYCC" NameSpace="Testproject" Assembly="Testproject" %> in a page in Testproject too. - I instanciate the cc with <MYCC:MyOwnControl id="moc" visible="true"></MYCC:MyOwnControl> Best regards Stephan

        M Offline
        M Offline
        minhpc_bk
        wrote on last edited by
        #3

        Hi there, You need to add the runat="server" to the declaration of your custom control, it should look like this:

        <MYCC:MyOwnControl runat="server" id="moc" visible="true"></MYCC:MyOwnControl>

        If you don't add it to the control declaration on the web page, you might see that markup when you do a view source the web page.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups