I have one page called myimage.aspx which creates random captcha image ,
<form id="form1" runat="server">
<div>
<%--<img src="MyImagePage.aspx">--%> //using normal page...this is working fine
<ucImage:ucMyImage ID="myimage" runat="server" /> //using usercontrol this gives me image but following textboxes , buttons ans labels are disappears :(
<asp:TextBox id="CodeNumberTextBox" runat="server"></asp:TextBox>
<asp:Button id="SubmitButton" runat="server" Text="Submit"></asp:Button><br>
<asp:Label ID="lblMessage" runat="server" Text="CORRECT!" Visible="false"></asp:Label>
</div>
</form>
i called that page on my index.aspx page like this <img src="MyImageControl.ascx">.
But instead of aspx page i have created it as a usercontrol myimagecontrol.ascx
and put it into index.aspx like <ucImage:ucMyImage ID="myimage" runat="server" /> also add <%@ Register %> tag too, but I’m only able to view image captcha not any other contains of index.aspx page like textbox or others button,
please tell me whats wrong???
Just open the design view and drag your control on the page where ever you want to call it
Make sure it is in design view.