Hi Bill,
Thank you for your post.
Depending on which ASP.NET version you are using, the answer to your
question varies:
1) If you are using ASP.NET 1.1, the UserControl's design-time rendering is
very limited and the behavior you're experiencing is expected.
2) If you are using ASP.NET 2.0, the UserControl's design-time rendering
should reflect the controls it's using. However, if the custom control
(IDWeb.Web.Control.Button) is placed under the website's App_Code folder,
due to ASP.NET 2.0 compilation model, it will show the custom control on
UserControl successfully, but will not show correctly if the UserControl is
used in WebForm or another UserControl again. You need to place the custom
control in a separate Class Library to get correct design-time rendering.
Hope this helps. Please feel free to post here if anything is unclear.
Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Bill Cohagan - 25 Jul 2006 15:34 GMT
Walter
Thanks for the suggestions; however the button custom control is already
in a dll. I'm using ASP.Net 2.0. Following is the code for the user control
as well:
<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="NewEditDeleteButtons.ascx.cs"
Inherits="UserControls_NewEditDeleteButtons" %>
<%@ Register TagPrefix="ctrl" Namespace="IDWeb.Web.Control"
Assembly="IDWeb.Web" %>
<asp:Table ID="AEDBTable" runat="server">
<asp:TableRow runat="server">
<asp:TableCell ID="TableCell26" runat="server" CssClass="data">
<ctrl:Button ID="btnNew" runat="server" Text="+"
OnClick="btnNew_Click"/>
</asp:TableCell>
<asp:TableCell ID="TableCell1" runat="server" CssClass="data">
<ctrl:Button ID="btnEdit" runat="server" Text="e"
OnClick="btnEdit_Click"/>
</asp:TableCell>
<asp:TableCell ID="TableCell27" runat="server" CssClass="data">
<ctrl:Button ID="btnDelete" runat="server" Text="X"
OnClick="btnDelete_Click"/>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
Note the Register element referencing the IDWeb.Web assembly. If I
understand your response correctly, you're saying this should work as-is,
right?
Regards,
Bill
> Hi Bill,
>
[quoted text clipped - 29 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.