|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Usercontrol - Problem in DesignerI 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>      <asp:Label runat="server">leicht</asp:Label>      <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" />      <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 Can you post the designer code?
Show quoteHide quote "Gellert" <radi***@gmx.at> schreef in bericht news:eGbUEUC9FHA.1140@tk2msftngp13.phx.gbl... > 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> >      <asp:Label runat="server">leicht</asp:Label> >      <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" /> >      <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 > > > > > > > -- > Sent via .NET Newsgroups > http://www.dotnetnewsgroups.com
VS2005 C# is very BUGGY, please hlp
custom control client values gone with postback Server Control - object not saved when button clicked How to cycle through checkboxes in a datagrid and find out which ones are checked? repost: custom control client values gone with postback -- no solution found... Setting focus to TextBox DropDownList Value Mouseover, mouseout, click etc on datagrid. DataList Issue Maintaining "id" attribute value in server controls |
|||||||||||||||||||||||