Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Usercontrol - Problem in Designer

Reply
Thread Tools

Usercontrol - Problem in Designer

 
 
Gellert
Guest
Posts: n/a
 
      11-28-2005
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






--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
 
Reply With Quote
 
 
 
 
Pipo
Guest
Posts: n/a
 
      11-30-2005
Can you post the designer code?

"Gellert" <> schreef in bericht
news:...
> 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
>
>
>
>
>
>
> --
> Sent via .NET Newsgroups
> http://www.dotnetnewsgroups.com



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Designer Property Serialization -- Sycning inner properties to designer property window Alexander Higgins ASP .Net Building Controls 3 07-30-2007 09:09 PM
Designer Property Serialization -- Sycning inner properties to designer property window Alexander Higgins ASP .Net Web Controls 0 07-21-2007 12:58 AM
Sharepoint Designer/ Expression Web Designer : adding item in toolbox ? Steve B. ASP .Net 4 06-01-2007 04:29 AM
Postback problem with usercontrol in usercontrol Mark van Bree ASP .Net Web Controls 1 05-30-2006 08:27 PM
Subclassing UserControl makes the Visual Studio designer does not work S Guiboud ASP .Net 1 07-18-2003 03:55 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57