Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

c#.net custo web control not rendering

Options
  • 15-01-2007 6:21pm
    #1
    Closed Accounts Posts: 884 ✭✭✭


    After having to reactor a project and move classes about for a custom control im getting a failure to render any HTML yet i can set breakpoints on the code behind the control and it runs fine.

    Even removing the <%Response.writes()%> and trying to get dead html fails.

    Can anyone point me in the right direction for possible problems as im stumped and will have to re-write

    no errors are displayed on the page i just get a blank section where the control was supposed to render

    any help would be greatly appreciated

    thanks,


Comments

  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    Something like this happened me before too. I'm not sure if I'm remembering this correctly, but I think it was something to do with the page directives to include the control. In your page that uses the control you should have something like
    <%@ Register Src="UserControl.ascx" TagName="UserControl" TagPrefix="uc1" %>
    
    at the top. and then you would use the control with something like
    <uc1:UserControl ID="myUC" runat="server" />
    
    .

    If I remember correctly, after I refactored something or other I got the same problem you're having. To fix it I removed the directive and the reference to the control, and then either put them back in by hand, or used visual studios designer to drop the control back in (which should create the appropriate directive). I'll think about it some more and see if I can remember exactly what it was.


  • Closed Accounts Posts: 884 ✭✭✭NutJob


    Thanks for the post much appreciated

    Got it sorted had to re-write it as i was trying to refrence a user control in another project and i guess it doesnt work like that (even with namespaces and assemblys correct).:)


Advertisement