<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Help::Automatic textbox generation' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Help::Automatic textbox generation' posted on the 'VB.NET' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2012 Programmers Heaven</copyright>
    <pubDate>Thu, 09 Feb 2012 07:30:22 -0800</pubDate>
    <lastBuildDate>Thu, 09 Feb 2012 07:30:22 -0800</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Help::Automatic textbox generation</title>
      <link>http://www.programmersheaven.com/mb/VBNET/409171/409171/helpautomatic-textbox-generation/</link>
      <description>Sub textbox1_textchanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged&lt;br /&gt;
 Dim count As Integer&lt;br /&gt;
            Dim t As New TextBox&lt;br /&gt;
            For count = 4 To 6&lt;br /&gt;
                MsgBox("vbbvbnv")&lt;br /&gt;
                t.Text = "TextBox" &amp;amp; count.ToString()&lt;br /&gt;
                t.ID = "TextBox" &amp;amp; count.ToString()&lt;br /&gt;
                Panel1.Controls.Add(t)&lt;br /&gt;
                count = count + 1&lt;br /&gt;
            &lt;br /&gt;
            Next count&lt;br /&gt;
&lt;br /&gt;
end sub&lt;br /&gt;
&lt;br /&gt;
ERROR::::Multiple controls with the same ID 'TextBox6' were found. FindControl requires that controls have unique IDs. &lt;br /&gt;
Description: An unhandled exception occurred during the execution of the current web request.How Can i Rectify this&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/409171/409171/helpautomatic-textbox-generation/</guid>
      <pubDate>Thu, 12 Nov 2009 08:26:32 -0800</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: Help::Automatic textbox generation</title>
      <link>http://www.programmersheaven.com/mb/VBNET/409171/409176/re-helpautomatic-textbox-generation/#409176</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
Move the line of code.&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dim t As New TextBox to just after.&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For count As Integer = 4 to 6&lt;br /&gt;
&lt;br /&gt;
that way you generate a NEW textbox each time.&lt;br /&gt;
&lt;br /&gt;
Give each a Location too. Try&lt;br /&gt;
&lt;br /&gt;
t.Location = New Point(count * 75,50)&lt;br /&gt;
&lt;br /&gt;
within the loop too.&lt;br /&gt;
&lt;br /&gt;
If this is a Web based project you could also try.&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://forums.asp.net/"&gt;http://forums.asp.net/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Best of luck and Happy coding.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/409171/409176/re-helpautomatic-textbox-generation/#409176</guid>
      <pubDate>Thu, 12 Nov 2009 11:28:56 -0800</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: Help::Automatic textbox generation</title>
      <link>http://www.programmersheaven.com/mb/VBNET/409171/409177/re-helpautomatic-textbox-generation/#409177</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I would do this with a button click though, not within a TextChanged event otherwise you will generate New TextBoxes every time the text is changed.&lt;br /&gt;
&lt;br /&gt;
As this looks like a WINDOWS FORM based project you would need.&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
t.Name = "TextBox" &amp;amp; count.ToString&lt;br /&gt;
&lt;br /&gt;
within the FOR NEXT next loop instead of&lt;br /&gt;
&lt;br /&gt;
t.Id = "TextBox" &amp;amp; count.ToString&lt;br /&gt;
&lt;br /&gt;
Remove the line&lt;br /&gt;
&lt;br /&gt;
count = count + 1&lt;br /&gt;
&lt;br /&gt;
as it interferes wih the FOR NEXT loop.&lt;br /&gt;
&lt;br /&gt;
How many TextBoxes are you wanting in the end?&lt;br /&gt;
&lt;br /&gt;
Best of luck and Happy coding.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/409171/409177/re-helpautomatic-textbox-generation/#409177</guid>
      <pubDate>Thu, 12 Nov 2009 11:30:45 -0800</pubDate>
      <category>VB.NET</category>
    </item>
  </channel>
</rss>
