<?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 Forms</title><link>http://forums.asp.net/18.aspx</link><description>All about building ASP.NET Pages - server controls, events, validation, etc.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: How to Assign Columns into a Dynamic ArrayList</title><link>http://forums.asp.net/thread/2469498.aspx</link><pubDate>Sun, 06 Jul 2008 05:07:10 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2469498</guid><dc:creator>Coool</dc:creator><author>Coool</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2469498.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=2469498</wfw:commentRss><description>&lt;p&gt;Sorry for late reply TimBue,&lt;/p&gt;
&lt;p&gt;Well Dictionary Class is defined under &lt;font size="2"&gt;System.Collections.Generic Namespace.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;So u can use either &lt;strong&gt;Imports &lt;/strong&gt;at the top of the Page or Directly use &lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; strQuestionList &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;New&lt;/font&gt;&lt;font size="2"&gt; System.Collections.Generic.Dictionary(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Of&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt;, System.Collections.Specialized.StringCollection)&lt;/font&gt;&lt;font size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: How to Assign Columns into a Dynamic ArrayList</title><link>http://forums.asp.net/thread/2469477.aspx</link><pubDate>Sun, 06 Jul 2008 04:27:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2469477</guid><dc:creator>TimBue</dc:creator><author>TimBue</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2469477.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=2469477</wfw:commentRss><description>Thanks for the example, However in trying to define an instance of a dictionary in VB.NET 2005 through and ASP.NET 2.0 application, the system cannot seem to find the dictionary type.&amp;nbsp; Only the DictionaryEntry, and DictionarySectionHandler types are available and does not allow for parameters.&amp;nbsp; I was wondering you could recommend a remedy to this situation. &lt;br /&gt;</description></item><item><title>Re: How to Assign Columns into a Dynamic ArrayList</title><link>http://forums.asp.net/thread/2468486.aspx</link><pubDate>Sat, 05 Jul 2008 04:54:34 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2468486</guid><dc:creator>Coool</dc:creator><author>Coool</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2468486.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=2468486</wfw:commentRss><description>&lt;p&gt;Hi TimBue,&lt;/p&gt;
&lt;p&gt;ArrayList is not sufficient and somehow eligent way to acomplish the task u want to do. U can use StringCollection for string Answers and Dictionary to store Question and Answers in StringCollection &lt;strong&gt;assuming that ur question strings&amp;nbsp;are unique&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Just look at the following demo.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="coloredcode"&gt;  &lt;span class="kwd"&gt;Dim&lt;/span&gt; strQuestionList &lt;span class="kwd"&gt;As New&lt;/span&gt; Dictionary(Of &lt;span class="kwd"&gt;String&lt;/span&gt;, System.Collections.Specialized.StringCollection)
        &lt;span class="kwd"&gt;Dim&lt;/span&gt; strAnswerList &lt;span class="kwd"&gt;As New&lt;/span&gt; System.Collections.Specialized.StringCollection()
        strAnswerList.Add(&lt;span class="st"&gt;&amp;quot;Answer 1&amp;quot;&lt;/span&gt;)
        strAnswerList.Add(&lt;span class="st"&gt;&amp;quot;Answer 2&amp;quot;&lt;/span&gt;)
        strAnswerList.Add(&lt;span class="st"&gt;&amp;quot;Answer 3&amp;quot;&lt;/span&gt;)
        strAnswerList.Add(&lt;span class="st"&gt;&amp;quot;Answer 4&amp;quot;&lt;/span&gt;)
        strQuestionList.Add(&lt;span class="st"&gt;&amp;quot;Question 1&amp;quot;&lt;/span&gt;, strAnswerList)

        strAnswerList = &lt;span class="kwd"&gt;New&lt;/span&gt; System.Collections.Specialized.StringCollection()
        strAnswerList.Add(&lt;span class="st"&gt;&amp;quot;Answer 1&amp;quot;&lt;/span&gt;)
        strAnswerList.Add(&lt;span class="st"&gt;&amp;quot;Answer 2&amp;quot;&lt;/span&gt;)
        strQuestionList.Add(&lt;span class="st"&gt;&amp;quot;Question 2&amp;quot;&lt;/span&gt;, strAnswerList)

        &lt;span class="kwd"&gt;Dim&lt;/span&gt; enumQuestionList &lt;span class="kwd"&gt;As&lt;/span&gt; Dictionary(Of &lt;span class="kwd"&gt;String&lt;/span&gt;, System.Collections.Specialized.StringCollection).Enumerator = strQuestionList.GetEnumerator()
        &lt;span class="kwd"&gt;While&lt;/span&gt; enumQuestionList.MoveNext()
            &lt;span class="kwd"&gt;Dim&lt;/span&gt; strQuestion &lt;span class="kwd"&gt;As String&lt;/span&gt; = enumQuestionList.Current.Key &lt;span class="cmt"&gt;&amp;#39;This Question u can add to Form Dynamically or whatever way u want
            &amp;#39;U can also add this RadioButtonList in Form too!!!
&lt;/span&gt;            &lt;span class="kwd"&gt;Dim&lt;/span&gt; rdo1 &lt;span class="kwd"&gt;As New&lt;/span&gt; RadioButtonList
            &lt;span class="kwd"&gt;For Each&lt;/span&gt; ans &lt;span class="kwd"&gt;As String In&lt;/span&gt; enumQuestionList.Current.Value
                rdo1.Items.Add(ans)
            &lt;span class="kwd"&gt;Next
        End While&lt;/span&gt;&lt;/pre&gt;&amp;nbsp;</description></item><item><title>Re: How to Assign Columns into a Dynamic ArrayList</title><link>http://forums.asp.net/thread/2468478.aspx</link><pubDate>Sat, 05 Jul 2008 04:39:12 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2468478</guid><dc:creator>cvrajeesh</dc:creator><author>cvrajeesh</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2468478.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=2468478</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;ArrayList is dynamic by default. You can add any number of items, no need to specify the size when initializing.&lt;/p&gt;&lt;p&gt;Since you are using .Net 2.0, you could go one step further i.e. use &lt;span style="font-weight:bold;"&gt;Generics&lt;/span&gt; there you have a List&amp;lt;T&amp;gt; with which you can ensure the type safety and improved performance when compared to ArrayList.&lt;/p&gt;&lt;p&gt;Please let me know, did this helped&amp;nbsp;&lt;/p&gt;</description></item><item><title>How to Assign Columns into a Dynamic ArrayList</title><link>http://forums.asp.net/thread/2468460.aspx</link><pubDate>Sat, 05 Jul 2008 04:23:51 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2468460</guid><dc:creator>TimBue</dc:creator><author>TimBue</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2468460.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=2468460</wfw:commentRss><description>&lt;p&gt;Hello all,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I am trying to figure out how to setup a dynamic arraylist, in which the arraylist will be variable in size depending upon the row it retrieves.&amp;nbsp; In other word the question it retreives will have variable number of answers.&amp;nbsp; One question might have 3 answers another might have 4 answers.&amp;nbsp; The columns for unused answer choices will be assigned a null value.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I am using VB.NET 2005 through my ASP.NET page.&amp;nbsp; My main goal is basically this.&lt;/p&gt;&lt;p&gt;Step 1.&amp;nbsp; Select Answer Columns from table where Answer value is not Null&lt;/p&gt;&lt;p&gt;Step 2. Generate radiobutton listitems based on number of answer columns in the AnswersTable for the retrieved question.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Step 2A: assign generated list items the values from the answerchoice columns.&lt;/p&gt;&lt;p&gt;I mainly need help with steps 2 and 2A.&amp;nbsp; I was looking at possibly interrating with a for&amp;nbsp; i to x&amp;nbsp; Next loop, where x is the last answer column available in the array to be assigned to the listitem&amp;nbsp;&amp;nbsp; If you need anymore clarification, please let me know. &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>