Usercontrol - Problem in Designer

G

Gellert

Hello,

I made an UserControl, when I drag and drop it into my webform i see the
following:
[MatrixQuestion "MatrixQuestion"] on my designer.

If I switch to the HTML Source I see this:
<cc1:MatrixQuestion ID="MatrixQuestion1" runat="server">
</cc1:MatrixQuestion>

so... when I change an attribute of my control then the designer shows
me the Control like I see it on my webpage. So I do not see
[MatrixQuestion "MatrixQuestion"] but I see the Control well designed.

The problem is, when I switch to the source again there are a lot of
entries between my control entry:
------
<cc1:MatrixQuestion ID="MatrixQuestion1" runat="server"
NumberOfRadio="5">
<asp:Label runat="server" Width="200px">Frage?</asp:Label>
&nbsp &nbsp &nbsp<asp:Label runat="server">leicht</asp:Label>
&nbsp &nbsp &nbsp<asp:RadioButton ID="1" runat="server"
AutoPostBack="True" GroupName="mygroup" />
<asp:RadioButton ID="2" runat="server" AutoPostBack="True"
GroupName="mygroup" />
<asp:RadioButton ID="3" runat="server" AutoPostBack="True"
GroupName="mygroup" />
<asp:RadioButton ID="4" runat="server" AutoPostBack="True"
GroupName="mygroup" />
&nbsp &nbsp &nbsp<asp:Label runat="server">schwer</asp:Label>
</cc1:MatrixQuestion>
------------


Why is that? Why does my Designer create the code again? I see my User
Control twice on my page now.
Or better asked: How can I avoid that my Designer creates the whole
HTML-tags for my control.


Thanks.
Gellert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top