<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.dotnetzone.gr:443/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET WebForms</title><link>https://www.dotnetzone.gr:443/cs/forums/13/ShowForum.aspx</link><description>Θέματα για web εφαρμογές, σε ASP.NET WebForms</description><dc:language>el</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Απ: Composite Control Design Time Rendering</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/41982.aspx</link><pubDate>Wed, 14 May 2008 20:25:29 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:41982</guid><dc:creator>Oldgeorge</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/41982.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=41982</wfw:commentRss><description>&lt;P&gt;Απ'όσο έχω διαβάσει, η EnsureChildControls() είναι απαραίτητη σε όλα τα custom controls που ξεκινάνε από το CombositeControl γιατί αλλιώς δεν είναι σίγουρο ότι τα περιεχόμενα controls θα έχουν δημιουργηθεί την ώρα που προσπαθείς να τους δώσεις/πάρεις κάποια properties μέσω delegates.&amp;nbsp; Γενικά αυτό το κομμάτι δεν μου παρουσιάζει πρόβλημα, εκεί που έχω μπλεχτεί τώρα είναι στο viewstate persistence&amp;nbsp;lower level properties (π.χ. τμήματα ενός style) αλλά δεν ξέρω αν θα προλάβω να το δω εις βάθος αυτή την στιγμή :( (μια και super inelegant χακίες έχουν φέρει το επιθυμητό αποτέλεσμα πριν το deadline).&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Μήπως έχει κανείς κάποιο καλό και χρήσιμο link για αυτό το θέμα (πάντα σχετικά με κάποιο composite control, τα απλά δουλεύουν μια χαρά);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Απ: Re: Απ: Composite Control Design Time Rendering</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/41969.aspx</link><pubDate>Wed, 14 May 2008 04:49:11 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:41969</guid><dc:creator>nullvoid</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/41969.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=41969</wfw:commentRss><description>Η κλήση της &lt;span style="font-weight:normal;font-size:11px;color:black;font-family:Courier New;background-color:transparent;"&gt;EnsureChildControls();&lt;/span&gt; είναι απαραίτητη;&lt;br&gt;&lt;br&gt;</description></item><item><title>Re: Απ: Composite Control Design Time Rendering</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/41931.aspx</link><pubDate>Mon, 12 May 2008 22:51:41 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:41931</guid><dc:creator>Oldgeorge</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/41931.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=41931</wfw:commentRss><description>&lt;P&gt;Ναι υποθέτω :)&lt;/P&gt;
&lt;P&gt;Απλά συνεχίζω να απορώ γιατί ένα custom control που γίνεται derived από το image κάνει render μια χαρά, ενώ ένα αντίστοιχο με τα ίδια ακριβώς πράγματα που ξεκινάει από composite control θέλει designer :(&amp;nbsp; Προφανώς, it's working as intended.&amp;nbsp; Θα σας ξαναταλαιπωρήσω λίαν συντόμως με κάτι θεματάκια σχετικά με το property persistence στον designer, αλλά δεν έχω τελειώσει το μαλιοτράβηγμα ακόμη :)&lt;/P&gt;</description></item><item><title>Απ: Composite Control Design Time Rendering</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/41897.aspx</link><pubDate>Sat, 10 May 2008 14:32:47 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:41897</guid><dc:creator>George J. Capnias</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/41897.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=41897</wfw:commentRss><description>&lt;P&gt;Δεν έχεις κάτι λάθος.&lt;/P&gt;
&lt;P&gt;Το ότι φτιάχνεις ένα control σε ASP.NET υλοποιώντας μόνο τα απαραίτητα και δουλεύει μέσα στις σελίδες σου, δεν πάει να πει ότι έχει και την πλήρη υποστήριξη από το Visual Studio. Για να μπορέσεις να έχεις support του designer του Visual Studio χρειάζεται να υλοποιήσεις τον designer. Δεν είσαι υποχρεωμένος, αλλά αισθάνεσαι καλύτερα όταν ρίχνεις το control σου στο designer και κάνει και εκεί κάτι...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;George J.&lt;BR&gt;&lt;/P&gt;</description></item><item><title>Composite Control Design Time Rendering</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/41890.aspx</link><pubDate>Fri, 09 May 2008 21:07:13 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:41890</guid><dc:creator>Oldgeorge</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/41890.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=41890</wfw:commentRss><description>&lt;P&gt;Οκ, μια και έφαγα σχεδόν μια μέρα για να δω τι μου γίνεται, και στο τέλος έμεινα με την απορία ευελπιστώ ότι κάποιος μπορεί να μεταγγίσει τα φώτα του :)&lt;/P&gt;
&lt;P&gt;Λοιπόν το σενάριο είναι το εξής απλό: υπάρχει ένα custom server control τύπου composite control το οποίο επί του παρόντος περιέχει μόνο ένα image control. Τα declarations που μας ενδιαφέρουν είναι τα εξής:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;class&lt;/SPAN&gt; HelpDialog : CompositeControl&lt;BR&gt;{&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;private&lt;/SPAN&gt; Image image;&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;protected&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;override&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;void&lt;/SPAN&gt; CreateChildControls()&lt;BR&gt;{&lt;BR&gt;Controls.Clear();&lt;BR&gt;&lt;BR&gt;image &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;new&lt;/SPAN&gt; Image();&lt;BR&gt;Controls.Add(image);&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;virtual&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;string&lt;/SPAN&gt; ImageUrl&lt;BR&gt;{&lt;BR&gt;get&lt;BR&gt;{&lt;BR&gt;EnsureChildControls();&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;return&lt;/SPAN&gt; ViewState[&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"ImageUrl"&lt;/SPAN&gt;] !&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;null&lt;/SPAN&gt; ? (&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;string&lt;/SPAN&gt;)ViewState[&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"ImageUrl"&lt;/SPAN&gt;] : image.ImageUrl;&lt;BR&gt;}&lt;BR&gt;set&lt;BR&gt;{&lt;BR&gt;EnsureChildControls();&lt;BR&gt;ViewState[&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"ImageUrl"&lt;/SPAN&gt;] &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; value;&lt;BR&gt;image.ImageUrl &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; value;&lt;BR&gt;}&lt;BR&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;Το αποτέλεσμα του παραπάνω ήταν ότι ενώ το control δούλευε κανονικά (ο υπόλοιπος κώδικας με τα javascript handlers κλπ δεν χρειάζεται), στο design time το image child control δεν έδειχνε τίποτα παρόλο που το ImageURL ήταν δηλωμένο σωστά. Το ίδιο πράγματα με control derived από το Image δούλευε άψογα (οπότε δεν είναι θέμα paths, κλπ).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;Κάνοντας μια μικρή εγχείρηση και αλλάζοντας το header του control σε&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;[Designer(&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;typeof&lt;/SPAN&gt;(HelpControlDesigner))]&lt;BR&gt;[ParseChildren(&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;false&lt;/SPAN&gt;)]&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;class&lt;/SPAN&gt; HelpDialog : CompositeControl&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;και προσθέτοντας το απλό &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;class&lt;/SPAN&gt; HelpControlDesigner : CompositeControlDesigner &lt;BR&gt;{&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;override&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;string&lt;/SPAN&gt; GetDesignTimeHtml()&lt;BR&gt;{&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;//return base.GetDesignTimeHtml();&lt;/SPAN&gt;&lt;BR&gt;HelpDialog x &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; (HelpDialog)&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;base&lt;/SPAN&gt;.Component;&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;return&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"&amp;lt;img src='"&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; x.ImageUrl &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"'/&amp;gt;"&lt;/SPAN&gt;;&lt;BR&gt;}&lt;BR&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;όλα δουλεύουν μια χαρά. Αλλά πιστεύω ότι δεν χρειάζεται αυτό το Override για να δουλέψει κάτι τόσο απλό, οπότε νομίζω ότι κάτι κάνω λάθος (και δεν θα ήθελα να το βρω μπροστά μου στην συνέχεια). Έχει κανείς καμιά ιδέα;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;υ.σ. Όλα τα παραπάνω σε vs2005&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description></item></channel></rss>