<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/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>Web Parts and Personalization</title><link>http://forums.asp.net/145.aspx</link><description>Discussions of the new ASP.NET 2.0 portal framework.  &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=167&amp;c=30" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Need a little help with some Web Part</title><link>http://forums.asp.net/thread/3254836.aspx</link><pubDate>Wed, 24 Jun 2009 08:55:12 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3254836</guid><dc:creator>ssherif</dc:creator><author>ssherif</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3254836.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=145&amp;PostID=3254836</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Perfect, thanks very much!&lt;/p&gt;</description></item><item><title>Re: Need a little help with some Web Part</title><link>http://forums.asp.net/thread/3254622.aspx</link><pubDate>Wed, 24 Jun 2009 07:21:03 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3254622</guid><dc:creator>vinz</dc:creator><author>vinz</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3254622.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=145&amp;PostID=3254622</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;ssherif:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;I&amp;#39;m designing a page around web parts (which I&amp;#39;m completely new to) and I&amp;#39;ve got a&amp;nbsp;question that feels kind of silly to ask.&lt;/p&gt;
&lt;p&gt;The way my project is set up is that I named a .ascx file&amp;nbsp;addPart.ascx and this file contains a button and a textbox (named txtAdd). Then, on another form (mainForm.aspx), I added a webpartzone and added my addPart.ascx to the zone. What I want to do is modify the txtAdd.Text property when the page loads, but I can&amp;#39;t access it from mainForm.vb as the text box is declared in the addPart.ascx file. &lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s an example:&lt;/p&gt;
&lt;p&gt;VB.NET&lt;/p&gt;&lt;pre class="vb.net" name="code"&gt;Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
    If WebPartManager1.WebParts.Count &amp;gt; 0 Then
        Dim wp As WebPart = DirectCast(WebPartManager1.WebParts(&amp;quot;WebUserControl1&amp;quot;), WebPart)
        Dim tb As TextBox = DirectCast(wp.Controls(0).FindControl(&amp;quot;TextBox1&amp;quot;), TextBox)
        If tb IsNot Nothing Then
            tb.Text = &amp;quot;Hello ASPNET!&amp;quot;
        End If
    End If
End Sub&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;C#&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt; protected void Page_Load(object sender, EventArgs e)
    {
        if (WebPartManager1.WebParts.Count &amp;gt; 0)
        {
            WebPart wp = (WebPart)WebPartManager1.WebParts[&amp;quot;WebUserControl1&amp;quot;];
            TextBox tb = (TextBox)wp.Controls[0].FindControl(&amp;quot;TextBox1&amp;quot;);
            if (tb != null)
            {
                tb.Text = &amp;quot;Hello ASPNET!&amp;quot;;
            }
        } 
    }&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Need a little help with some Web Part</title><link>http://forums.asp.net/thread/3254545.aspx</link><pubDate>Wed, 24 Jun 2009 06:48:55 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3254545</guid><dc:creator>ssherif</dc:creator><author>ssherif</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3254545.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=145&amp;PostID=3254545</wfw:commentRss><description>&lt;p&gt;Hi all&lt;/p&gt;
&lt;p&gt;I&amp;#39;m designing a page around web parts (which I&amp;#39;m completely new to) and I&amp;#39;ve got a&amp;nbsp;question that feels kind of silly to ask.&lt;/p&gt;
&lt;p&gt;The way my project is set up is that I named a .ascx file&amp;nbsp;addPart.ascx and this file contains a button and a textbox (named txtAdd). Then, on another form (mainForm.aspx), I added a webpartzone and added my addPart.ascx to the zone. What I want to do is modify the txtAdd.Text property when the page loads, but I can&amp;#39;t access it from mainForm.vb as the text box is declared in the addPart.ascx file. &lt;/p&gt;
&lt;p&gt;Pushing the button isn&amp;#39;t a problem as I can&amp;nbsp; just double click the button on the addPart.ascx file and write the needed code there. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If anyone could give me a hand I&amp;#39;d really appreciate it, thanks.&lt;/p&gt;</description></item></channel></rss>