<@ Register TagPrefix="controls" nameSpace="name" Assembly = ??????

Last post 07-15-2008 11:33 AM by brnmail. 5 replies.

Sort Posts:

  • <@ Register TagPrefix="controls" nameSpace="name" Assembly = ??????

    07-14-2008, 10:47 AM
    • Member
      5 point Member
    • brnmail
    • Member since 07-14-2008, 10:40 AM
    • Posts 8

    hi

     

    I´m using the VWD 2008 Express and did not have the option for create a web application

    and like that do not have the assembly file

    <@ Register TagPrefix="controls" nameSpace="name" Assembly =  ??????

    what should i do because

    im getting the error

    "There was an error rendering the control" 

     Sorry the english!

    Thanks
     

     

  • Re: <@ Register TagPrefix="controls" nameSpace="name" Assembly = ??????

    07-14-2008, 11:01 AM
    • Contributor
      2,051 point Contributor
    • Trax72
    • Member since 06-12-2008, 1:12 PM
    • Posts 288

     Something like this should work (I got this by drag/dropping the webusercontrol.ascx to the page in design mode):

    <%@ Register src="WebUserControl.ascx" TagName="WebUserControl" TagPrefix="uc1" %>
    
    with in the content:
    
    <uc1:WebUserControl ID="WebUserControl1" runat="server" />
      
    C#: if (this.IsHelpful) this.MarkAsAnswer();
    VB: If Me.IsHelpful Then Me.MarkAsAnswer()
  • Re: <@ Register TagPrefix="controls" nameSpace="name" Assembly = ??????

    07-14-2008, 11:02 AM
    • Participant
      1,266 point Participant
    • dswersky
    • Member since 06-18-2008, 3:45 PM
    • Posts 218

    Is that exact line in your page or did you modify it for posting?

    Is this your code or are you working with a sample?  That line is used to register controls for use in a page.  If you could post it exactly as it shows in your code that would be helpful.

  • Re: <@ Register TagPrefix="controls" nameSpace="name" Assembly = ??????

    07-14-2008, 2:10 PM
    • Member
      5 point Member
    • brnmail
    • Member since 07-14-2008, 10:40 AM
    • Posts 8

    Trax72:
    src="WebUserControl.ascx"
     

    the 2 source files are .cs files

    its possible to create a .dll file from these files just to the Controls ??

    if is possible will resolve the problem probably

    because i can create the assembly  in C# express  

     

    Now im not anymore  in the pc where i was doing the program

    tomorrow i will see what i can do  

     

     

    thanks for the answers Yes 

     

     

  • Re: <@ Register TagPrefix="controls" nameSpace="name" Assembly = ??????

    07-14-2008, 7:46 PM
    Answer
    • Contributor
      2,051 point Contributor
    • Trax72
    • Member since 06-12-2008, 1:12 PM
    • Posts 288

     It's a bit of a pain, but yes, that's possible. Just tried it out with some sample control. Started a Class library, pasted in the custom control code. Added it to the toolbar in Visual Web Dev and dragged it onto the screen, works fine.

    <%@ Register Assembly="ClassLibrary1" Namespace="Samples.AspNet.CS.Controls" TagPrefix="cc1" %>
    
    <cc1:WelcomeLabel ID="WelcomeLabel1" runat="server" Text="Welcome" />
      
    C#: if (this.IsHelpful) this.MarkAsAnswer();
    VB: If Me.IsHelpful Then Me.MarkAsAnswer()
  • Re: <@ Register TagPrefix="controls" nameSpace="name" Assembly = ??????

    07-15-2008, 11:33 AM
    • Member
      5 point Member
    • brnmail
    • Member since 07-14-2008, 10:40 AM
    • Posts 8
    Create de assembly outside de VWD works thanks to all !!
Page 1 of 1 (6 items)