<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: ASP.Net Dynamic Controls (Part 1)</title>
	<atom:link href="http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/</link>
	<description>Discussion on Development in Several Different Flavours</description>
	<pubDate>Thu, 20 Nov 2008 09:30:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: ianbara</title>
		<link>http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-39925</link>
		<dc:creator>ianbara</dc:creator>
		<pubDate>Fri, 24 Oct 2008 08:53:50 +0000</pubDate>
		<guid isPermaLink="false">http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-39925</guid>
		<description>Awesome, you just helped my solve my problem, was creating the controls in the PreReneder event rather than the init. 

Cheers :)</description>
		<content:encoded><![CDATA[<p>Awesome, you just helped my solve my problem, was creating the controls in the PreReneder event rather than the init. </p>
<p>Cheers :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dynamically add user control under UpdatePanel in ASP.NET &#171; 麥克斯做個不宅的工程師</title>
		<link>http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-37395</link>
		<dc:creator>Dynamically add user control under UpdatePanel in ASP.NET &#171; 麥克斯做個不宅的工程師</dc:creator>
		<pubDate>Thu, 02 Oct 2008 05:06:30 +0000</pubDate>
		<guid isPermaLink="false">http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-37395</guid>
		<description>[...] am not going to tell you all sorts of ways to accomplish this since some guys out there have already done this. And I learned from them. Here is how I like to do [...]</description>
		<content:encoded><![CDATA[<p>[...] am not going to tell you all sorts of ways to accomplish this since some guys out there have already done this. And I learned from them. Here is how I like to do [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Omer</title>
		<link>http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-33469</link>
		<dc:creator>Omer</dc:creator>
		<pubDate>Tue, 26 Aug 2008 02:08:12 +0000</pubDate>
		<guid isPermaLink="false">http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-33469</guid>
		<description>This is what I was looking for for hours all over the internet. By far the best solution out there. 

Thank you!</description>
		<content:encoded><![CDATA[<p>This is what I was looking for for hours all over the internet. By far the best solution out there. </p>
<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lonso</title>
		<link>http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-29869</link>
		<dc:creator>Lonso</dc:creator>
		<pubDate>Sun, 20 Jul 2008 15:58:35 +0000</pubDate>
		<guid isPermaLink="false">http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-29869</guid>
		<description>Hi,
I have a question concerning dynamically created linkbuttons.

I have a webpage where I create in the page_load event about 10.000 linkbuttons dynamically. Each of them gets a unique ID of course and all of the share the same click event handler (but with different command arguments).

When one of these linkbuttons is clicked, a pageback occurs. I understand, that I have to recreate the dynamically created linkbuttons (and I've seen that this works) - but creation of 10.000 buttons takes quite a while. I would prefer to only recreate the one which was actually pressed and then call the click method defined in the event handler (with the arguments assigned to the button).

Is this possible? It might be sufficient to get the ID of the clicked button. How do I retrieve this ID?</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I have a question concerning dynamically created linkbuttons.</p>
<p>I have a webpage where I create in the page_load event about 10.000 linkbuttons dynamically. Each of them gets a unique ID of course and all of the share the same click event handler (but with different command arguments).</p>
<p>When one of these linkbuttons is clicked, a pageback occurs. I understand, that I have to recreate the dynamically created linkbuttons (and I&#8217;ve seen that this works) - but creation of 10.000 buttons takes quite a while. I would prefer to only recreate the one which was actually pressed and then call the click method defined in the event handler (with the arguments assigned to the button).</p>
<p>Is this possible? It might be sufficient to get the ID of the clicked button. How do I retrieve this ID?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Praveen Kunwar</title>
		<link>http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-25146</link>
		<dc:creator>Praveen Kunwar</dc:creator>
		<pubDate>Wed, 28 May 2008 08:57:01 +0000</pubDate>
		<guid isPermaLink="false">http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-25146</guid>
		<description>Hi Arvind,

For dynamic generated button, you can add event on row databound event.
Eg.
protected void gvData_DataBound(object sender, GridViewRowEventArgs e)
    { 
 foreach (GridViewRow Row in GrdViewSearch.Rows)
      {
        for (int i = 0; i &#60; Row.Cells.Count; i++)
        {
          if (Row.Cells[i].Text == "1")
          {
CheckBox chkCheckBox = new CheckBox();
            TableCell tcCheckCell = new TableCell();
            tcCheckCell.ID = "tcCell" + i;
            chkCheckBox.ID = "_#_CHK_#_" + i;
            chkCheckBox.Checked = true;
            chkCheckBox.Attributes.Add("onClick", "SelectOneDynamic(this.id, this.checked);");
            tcCheckCell.Controls.Add(chkCheckBox);
            Row.Cells.RemoveAt(i);
            Row.Cells.AddAt(i, tcCheckCell);
          }

Actually in my dataset, the checkbox value has 1 or 0.
So i am replacing that particular "CELL" with checkbox cheked.

Hope it will help</description>
		<content:encoded><![CDATA[<p>Hi Arvind,</p>
<p>For dynamic generated button, you can add event on row databound event.<br />
Eg.<br />
protected void gvData_DataBound(object sender, GridViewRowEventArgs e)<br />
    {<br />
 foreach (GridViewRow Row in GrdViewSearch.Rows)<br />
      {<br />
        for (int i = 0; i &lt; Row.Cells.Count; i++)<br />
        {<br />
          if (Row.Cells[i].Text == &#8220;1&#8243;)<br />
          {<br />
CheckBox chkCheckBox = new CheckBox();<br />
            TableCell tcCheckCell = new TableCell();<br />
            tcCheckCell.ID = &#8220;tcCell&#8221; + i;<br />
            chkCheckBox.ID = &#8220;_#_CHK_#_&#8221; + i;<br />
            chkCheckBox.Checked = true;<br />
            chkCheckBox.Attributes.Add(&#8221;onClick&#8221;, &#8220;SelectOneDynamic(this.id, this.checked);&#8221;);<br />
            tcCheckCell.Controls.Add(chkCheckBox);<br />
            Row.Cells.RemoveAt(i);<br />
            Row.Cells.AddAt(i, tcCheckCell);<br />
          }</p>
<p>Actually in my dataset, the checkbox value has 1 or 0.<br />
So i am replacing that particular &#8220;CELL&#8221; with checkbox cheked.</p>
<p>Hope it will help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Praveen Kunwar</title>
		<link>http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-25145</link>
		<dc:creator>Praveen Kunwar</dc:creator>
		<pubDate>Wed, 28 May 2008 08:52:12 +0000</pubDate>
		<guid isPermaLink="false">http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-25145</guid>
		<description>Hi Gene.

Thanks alot for your help.
Actually i was created dynamic checkbox control in gridview. The procedure i am decribing....
Firstly i bounded the gridview with datasource. Then  with Row DataBound eg (protected void gvData_DataBound(object sender, GridViewRowEventArgs e)), i created the dynamic checkbox control.
Then i used viewstate eg - 
 protected override void LoadViewState(object savedState)
    {
      BindGrid();
      base.LoadViewState(savedState);
    }


Its successfully work. 

Hope it help.</description>
		<content:encoded><![CDATA[<p>Hi Gene.</p>
<p>Thanks alot for your help.<br />
Actually i was created dynamic checkbox control in gridview. The procedure i am decribing&#8230;.<br />
Firstly i bounded the gridview with datasource. Then  with Row DataBound eg (protected void gvData_DataBound(object sender, GridViewRowEventArgs e)), i created the dynamic checkbox control.<br />
Then i used viewstate eg -<br />
 protected override void LoadViewState(object savedState)<br />
    {<br />
      BindGrid();<br />
      base.LoadViewState(savedState);<br />
    }</p>
<p>Its successfully work. </p>
<p>Hope it help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arvind</title>
		<link>http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-21678</link>
		<dc:creator>arvind</dc:creator>
		<pubDate>Thu, 28 Feb 2008 11:55:37 +0000</pubDate>
		<guid isPermaLink="false">http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-21678</guid>
		<description>how can i fire event on dynamically generated button.
problem is that:
i generate dynamically 3 dropdown list and one button on click of static button.
when i click on dynamic generate button then all dynamic generate controlls hide then how can i catch selected value of dropdown list..
for further process.........</description>
		<content:encoded><![CDATA[<p>how can i fire event on dynamically generated button.<br />
problem is that:<br />
i generate dynamically 3 dropdown list and one button on click of static button.<br />
when i click on dynamic generate button then all dynamic generate controlls hide then how can i catch selected value of dropdown list..<br />
for further process&#8230;&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sathya</title>
		<link>http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-21525</link>
		<dc:creator>Sathya</dc:creator>
		<pubDate>Tue, 26 Feb 2008 05:12:56 +0000</pubDate>
		<guid isPermaLink="false">http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-21525</guid>
		<description>Hi

 I tried to fire the Button click event on Dynamic button control. But it's won't fire. 

Please anyone help me

thanks</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p> I tried to fire the Button click event on Dynamic button control. But it&#8217;s won&#8217;t fire. </p>
<p>Please anyone help me</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rahil</title>
		<link>http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-20917</link>
		<dc:creator>rahil</dc:creator>
		<pubDate>Tue, 12 Feb 2008 07:35:50 +0000</pubDate>
		<guid isPermaLink="false">http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-20917</guid>
		<description>i want define dynamic chechkbox and when i click on it(CheckedChanged) the visible of my button become true.
please help me
thaks</description>
		<content:encoded><![CDATA[<p>i want define dynamic chechkbox and when i click on it(CheckedChanged) the visible of my button become true.<br />
please help me<br />
thaks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chandu</title>
		<link>http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-17647</link>
		<dc:creator>chandu</dc:creator>
		<pubDate>Tue, 20 Nov 2007 10:25:23 +0000</pubDate>
		<guid isPermaLink="false">http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/#comment-17647</guid>
		<description>hi 
 
 i utilize these controls in prj these dyamically
controls are useful while pls send the code 
of combobox,gridview control code dynamically 

  chandu(:-</description>
		<content:encoded><![CDATA[<p>hi </p>
<p> i utilize these controls in prj these dyamically<br />
controls are useful while pls send the code<br />
of combobox,gridview control code dynamically </p>
<p>  chandu(:-</p>
]]></content:encoded>
	</item>
</channel>
</rss>
