<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Dotnetsharepointwatever's Blog</title>
	<atom:link href="http://dotnetsharepointwatever.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dotnetsharepointwatever.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Thu, 23 Oct 2008 21:40:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='dotnetsharepointwatever.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Dotnetsharepointwatever's Blog</title>
		<link>http://dotnetsharepointwatever.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dotnetsharepointwatever.wordpress.com/osd.xml" title="Dotnetsharepointwatever&#039;s Blog" />
	<atom:link rel='hub' href='http://dotnetsharepointwatever.wordpress.com/?pushpress=hub'/>
		<item>
		<title>MasterPage: Getting Dynamic Control ClientID</title>
		<link>http://dotnetsharepointwatever.wordpress.com/2008/10/23/getting_dynamic_control_clientid/</link>
		<comments>http://dotnetsharepointwatever.wordpress.com/2008/10/23/getting_dynamic_control_clientid/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 21:30:09 +0000</pubDate>
		<dc:creator>dotnetsharepointwatever</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[clientID]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[dynamic created contro]]></category>
		<category><![CDATA[masterpage]]></category>

		<guid isPermaLink="false">http://dotnetsharepointwatever.wordpress.com/?p=12</guid>
		<description><![CDATA[Accessing control from javascript could be quite trouble some when you are using MasterPage. if you are having a TextBox in your page, the ClientID of the control will automatically generated as ctl00_ContentPlaceHolder1_TextBox1. To make it easier, you can just simply hardcode the &#8220;ctl00_ContentPlaceHolder1_&#8221; But, In my case hardcoding the &#8220;ctl00_ContentPlaceHolder1_&#8221; it&#8217;s not a good [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetsharepointwatever.wordpress.com&amp;blog=5275649&amp;post=12&amp;subd=dotnetsharepointwatever&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Accessing control from javascript could be quite trouble some when you are using MasterPage.<br />
if you are having a TextBox in your page, the ClientID of the control will automatically generated as <strong>ctl00_ContentPlaceHolder1_TextBox1</strong>.<br />
To make it easier, you can just simply hardcode the<strong> &#8220;ctl00_ContentPlaceHolder1_&#8221;</strong></p>
<p>But, In my case hardcoding the<strong> &#8220;ctl00_ContentPlaceHolder1_&#8221;</strong> it&#8217;s not a good idea, Because the MasterPage could be Recursive, and the Page could use by many project ( using embedded resource and so-on). It will generated different ClientID when it&#8217;s being call by different Project.</p>
<p>here&#8217;s something you can do, to get the ClientID :</p>
<div style="overflow:auto;height:100px;border:1px solid;">
<div style="background:white;">
<p style="margin:0;">      function showTextBoxClientId ()</p>
<p style="margin:0;">      {</p>
<p style="margin:0;">            var txtBox = &#8216;&lt;%=TextBox1.ClientID%&gt;&#8217;;</p>
<p style="margin:0;">            alert (txtBox);</p>
<p style="margin:0;">      }</p>
<p style="margin:0;"> </p>
</div>
</div>
<p>But, what if the control is generated dynamically??, something like this..</p>
<div style="overflow:auto;height:190px;border:1px solid;">
<div style="background:white;">        private void GenerateControl()</div>
<div style="background:white;">
<div style="background:white;">        {</div>
<div style="background:white;">            Panel panel = new Panel();</div>
<div style="background:white;">            panel.ID = &#8220;GeneratedPanel1&#8243;;</div>
<div style="background:white;">            panel.Controls.Add(new LiteralControl(&#8220;CLick button to hide / show this text &#8220;));</div>
<div style="background:white;">            Button btn = new Button();</div>
<div style="background:white;">            btn.ID = &#8220;TestBtn&#8221;;</div>
<div style="background:white;">            btn.Text = &#8220;Hide/Show&#8221;;</div>
<div style="background:white;">            btn.Attributes.Add(&#8220;onClick&#8221;, &#8220;return ShowHidePanel (&#8216;&#8221; + panel.ClientID + &#8220;&#8216;);&#8221;);</div>
<div style="background:white;">            Panel1.Controls.Add(btn);</div>
<div style="background:white;">            Panel1.Controls.Add(panel);</div>
<div style="background:white;">        }</div>
</div>
</div>
<p> <br />
The showHidePanel alert will only show <strong>&#8220;GeneratedPanel1&#8243;</strong>, <strong>without</strong> <strong> &#8220;ctl00_ContentPlaceHolder1_&#8221;</strong></p>
<div style="overflow:auto;height:100px;border:1px solid;">
<div style="background:white;">
<p style="margin:0;">function ShowHidePanel(id) {</p>
<p style="margin:0;">{</p>
<p style="margin:0;">alert (id);</p>
<p style="margin:0;">return false;</p>
<p style="margin:0;">}</p>
<p style="margin:0;"> </p>
</div>
</div>
<p>Then, here&#8217;s what I did in order to get it right..</p>
<div style="overflow:auto;height:100px;border:1px solid;">
<div style="background:white;">
<p style="margin:0;">function ShowHidePanel(id) {</p>
<p style="margin:0;">var tempid = &#8221;;</p>
<p style="margin:0;">tempid = tempid.replace(&#8216;TextBox1&#8242;, id);</p>
<p style="margin:0;">obj = document.getElementById(tempid);</p>
<p style="margin:0;"> </p>
<p style="margin:0;">if (obj.style.display == &#8216;none&#8217;)</p>
<p style="margin:0;">{ obj.style.display = &#8221;; }</p>
<p style="margin:0;">else</p>
<p style="margin:0;">{ obj.style.display = &#8216;none&#8217;; }</p>
<p style="margin:0;"> </p>
<p style="margin:0;">return false;</p>
<p style="margin:0;">}</p>
</div>
</div>
<p>I get the <strong> &#8220;ctl00_ContentPlaceHolder1_&#8221;</strong> from non dynamic control, and just replace the controlID with the control that we need.</p>
<p>Please download the whole code <a href="http://www.esnips.com/doc/3786aa2a-e942-42c2-a6a8-b5ce14699ae5/20081023MasterPageControlClientID">here </a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotnetsharepointwatever.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotnetsharepointwatever.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotnetsharepointwatever.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotnetsharepointwatever.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dotnetsharepointwatever.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dotnetsharepointwatever.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dotnetsharepointwatever.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dotnetsharepointwatever.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotnetsharepointwatever.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotnetsharepointwatever.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotnetsharepointwatever.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotnetsharepointwatever.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotnetsharepointwatever.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotnetsharepointwatever.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetsharepointwatever.wordpress.com&amp;blog=5275649&amp;post=12&amp;subd=dotnetsharepointwatever&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dotnetsharepointwatever.wordpress.com/2008/10/23/getting_dynamic_control_clientid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b7ed5ddebbb6f0ef955cdd9e855f587?s=96&#38;d=identicon" medium="image">
			<media:title type="html">dotnetsharepointwatever</media:title>
		</media:content>
	</item>
		<item>
		<title>How to Fix: You do not have permission to open this file on Excel Services</title>
		<link>http://dotnetsharepointwatever.wordpress.com/2008/10/23/how-to-fix-you-do-not-have-permission-to-open-this-file-on-excel-services/</link>
		<comments>http://dotnetsharepointwatever.wordpress.com/2008/10/23/how-to-fix-you-do-not-have-permission-to-open-this-file-on-excel-services/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 20:31:48 +0000</pubDate>
		<dc:creator>dotnetsharepointwatever</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dotnetsharepointwatever.wordpress.com/?p=10</guid>
		<description><![CDATA[I just started learning excel services in MOSS 2007. I am using the this book with the code companion. When I was trying the first hello world code example, I hit error &#8220;You do not have permission to open this file on Excel Services &#8221; at this code below I just started learning excel services [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetsharepointwatever.wordpress.com&amp;blog=5275649&amp;post=10&amp;subd=dotnetsharepointwatever&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just started learning excel services in MOSS 2007. I am using the this book with the <a href="http://www.microsoft.com/mspress/companion/9780735624078/">code companion</a>.<br />
When I was trying the first hello world code example, I hit error<br />
&#8220;You do not have permission to open this file on Excel Services &#8221; at this code below</p>
<p><a href="http://2.bp.blogspot.com/_vK4TJux1Tis/SPOHoCmUZvI/AAAAAAAABlE/f0xZ810Foak/s1600-h/error.gif"><img style="cursor:pointer;width:436px;height:207px;" src="http://2.bp.blogspot.com/_vK4TJux1Tis/SPOHoCmUZvI/AAAAAAAABlE/f0xZ810Foak/s400/error.gif" border="0" alt="" /></a></p>
<p>I just started learning excel services in MOSS 2007. I am using the this book with the <a href="http://www.microsoft.com/mspress/companion/9780735624078/">code companion</a>.<br />
When I was trying the first hello world code example, I hit error<br />
&#8220;You do not have permission to open this file on Excel Services &#8221; at this code below</p>
<p>after spent about 2 hours google-ing, and try this and there, I managed to solve this..<br />
All my setting are correct, I only missed this one part</p>
<p><span style="color:#ff0000;font-weight:bold;font-size:130%;">When creating trusted file, </span><span style="color:#ff0000;font-weight:bold;font-size:130%;">For this programming excel services.. you have to select HTTP as the location type</span></p>
<p>then, it&#8217;s working well !!</p>
<p>but, let say it&#8217;s not your problem, please check this following link for other setting..<br />
<a href="http://sharenotes.wordpress.com/2007/12/21/excel-services-charts-spreadsheets-worksheets-in-sharepoint-issues/">http://sharenotes.wordpress.com/2007/12/21/excel-services-charts-spreadsheets-worksheets-in-sharepoint-issues/</a></p>
<p>Hope it&#8217;s work for you <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotnetsharepointwatever.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotnetsharepointwatever.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotnetsharepointwatever.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotnetsharepointwatever.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dotnetsharepointwatever.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dotnetsharepointwatever.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dotnetsharepointwatever.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dotnetsharepointwatever.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotnetsharepointwatever.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotnetsharepointwatever.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotnetsharepointwatever.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotnetsharepointwatever.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotnetsharepointwatever.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotnetsharepointwatever.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetsharepointwatever.wordpress.com&amp;blog=5275649&amp;post=10&amp;subd=dotnetsharepointwatever&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dotnetsharepointwatever.wordpress.com/2008/10/23/how-to-fix-you-do-not-have-permission-to-open-this-file-on-excel-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b7ed5ddebbb6f0ef955cdd9e855f587?s=96&#38;d=identicon" medium="image">
			<media:title type="html">dotnetsharepointwatever</media:title>
		</media:content>

		<media:content url="http://2.bp.blogspot.com/_vK4TJux1Tis/SPOHoCmUZvI/AAAAAAAABlE/f0xZ810Foak/s400/error.gif" medium="image" />
	</item>
		<item>
		<title>Sharepoint: Developing User Control with Code Behind</title>
		<link>http://dotnetsharepointwatever.wordpress.com/2008/10/23/sharepoint-developing-user-control-with-code-behind/</link>
		<comments>http://dotnetsharepointwatever.wordpress.com/2008/10/23/sharepoint-developing-user-control-with-code-behind/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 20:31:14 +0000</pubDate>
		<dc:creator>dotnetsharepointwatever</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dotnetsharepointwatever.wordpress.com/?p=8</guid>
		<description><![CDATA[it&#8217;s kind of easy and simple actually.. 1. you just need to copy the ascx to the 12 hive folder.. 2. register the dll as global assembly, 3. since sharepoint accessing all dll, from gac, we need to change the top part of the ascx file I am not going to waste time to make [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetsharepointwatever.wordpress.com&amp;blog=5275649&amp;post=8&amp;subd=dotnetsharepointwatever&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>it&#8217;s kind of easy and simple actually..<br />
1. you just need to copy the ascx to the 12 hive folder..<br />
2. register the dll as global assembly,<br />
3. since sharepoint accessing all dll, from gac, we need to change the top part of the ascx file</p>
<pre></pre>
<p>I am not going to waste time to make a long blog about this.. cause the following blog did a great job, check it out here :<br />
<a href="http://jamestsai.net/Blog/post/Using-ASPNET-Web-User-Control-with-Code-Behind-in-SharePoint.aspx">http://jamestsai.net/Blog/post/Using-ASPNET-Web-User-Control-with-Code-Behind-in-SharePoint.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotnetsharepointwatever.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotnetsharepointwatever.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotnetsharepointwatever.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotnetsharepointwatever.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dotnetsharepointwatever.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dotnetsharepointwatever.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dotnetsharepointwatever.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dotnetsharepointwatever.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotnetsharepointwatever.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotnetsharepointwatever.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotnetsharepointwatever.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotnetsharepointwatever.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotnetsharepointwatever.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotnetsharepointwatever.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetsharepointwatever.wordpress.com&amp;blog=5275649&amp;post=8&amp;subd=dotnetsharepointwatever&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dotnetsharepointwatever.wordpress.com/2008/10/23/sharepoint-developing-user-control-with-code-behind/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b7ed5ddebbb6f0ef955cdd9e855f587?s=96&#38;d=identicon" medium="image">
			<media:title type="html">dotnetsharepointwatever</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamically/Run Time Create Control and access the Entered value</title>
		<link>http://dotnetsharepointwatever.wordpress.com/2008/10/23/dynamicallyrun-time-create-control-and-access-the-entered-value/</link>
		<comments>http://dotnetsharepointwatever.wordpress.com/2008/10/23/dynamicallyrun-time-create-control-and-access-the-entered-value/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 20:16:34 +0000</pubDate>
		<dc:creator>dotnetsharepointwatever</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[ContentPlaceHolder]]></category>
		<category><![CDATA[Panel]]></category>

		<guid isPermaLink="false">http://dotnetsharepointwatever.wordpress.com/?p=3</guid>
		<description><![CDATA[There will be a time when you need to create a control (textbox/dropdownlist/label) dynamically. Then what you need to do is. 1. Add a panel into your form 2. Create code behind that generate the control, and put it into the panel. 3. CALL THE CONTROL GENERATE PART EVERY POST BACK You need to generate [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetsharepointwatever.wordpress.com&amp;blog=5275649&amp;post=3&amp;subd=dotnetsharepointwatever&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There will be a time when you need to create a control (textbox/dropdownlist/label) dynamically.</p>
<p>Then what you need to do is.<br />
1. Add a panel into your form<br />
2. Create code behind that generate the control, and put it into the panel.<br />
<span style="font-weight:bold;">3. CALL THE CONTROL GENERATE PART EVERY POST BACK</span></p>
<div><span style="font-weight:bold;"><br />
</span>You need to generate the control every page post back, otherwise the control wont be there after post back.<br />
But don&#8217;t worry about the value of the control, it will wont disappear, it will still be there, it&#8217;s being store in the viewstate.     </p>
<p>Since code speaks thousand words, Please take a look at the code below :<br />
- Default.aspx.cs</p>
<div style="overflow:auto;height:200px;border:1px solid;">
<div style="background:white;">
<p style="margin:0;"> </p>
<p style="margin:0;">        protected void Page_Init(object sender, EventArgs e)</p>
<p style="margin:0;">        {</p>
<p style="margin:0;">            GenerateControl();</p>
<p style="margin:0;">        }</p>
<p style="margin:0;">        private void GenerateControl()</p>
<p style="margin:0;">        {</p>
<p style="margin:0;">            Panel1.Controls.Clear ();</p>
<p style="margin:0;">            Table tbl = new Table();</p>
<p style="margin:0;">            tbl.ID = &#8220;table123&#8243;;</p>
<p style="margin:0;">            for ( int i = 0 ; i &lt; NumberOfControl ; i++ )</p>
<p style="margin:0;">            {</p>
<p style="margin:0;">                TableRow tr = new TableRow();</p>
<p style="margin:0;"> </p>
<p style="margin:0;">                // creating label </p>
<p style="margin:0;">                TableCell tc = new TableCell();</p>
<p style="margin:0;">                Label lbl = new Label();</p>
<p style="margin:0;">                lbl.Text = &#8220;Value &#8221; + (i+1).ToString();</p>
<p style="margin:0;">                tc.Controls.Add(lbl);</p>
<p style="margin:0;">                tr.Cells.Add(tc);</p>
<p style="margin:0;"> </p>
<p style="margin:0;">                tc = new TableCell();</p>
<p style="margin:0;">                lbl = new Label();</p>
<p style="margin:0;">                lbl.Text = &#8220;:&#8221;;</p>
<p style="margin:0;">                tc.Controls.Add(lbl);</p>
<p style="margin:0;">                tr.Cells.Add(tc);</p>
<p style="margin:0;"> </p>
<p style="margin:0;">                // creating txtbox  </p>
<p style="margin:0;">                tc = new TableCell();</p>
<p style="margin:0;">                TextBox txt = new TextBox();</p>
<p style="margin:0;">                txt.ID = &#8220;DynamicTextBox&#8221; + i.ToString();</p>
<p style="margin:0;">                tc.Controls.Add(txt);</p>
<p style="margin:0;">                tr.Cells.Add(tc);</p>
<p style="margin:0;"> </p>
<p style="margin:0;">                tbl.Rows.Add(tr);</p>
<p style="margin:0;">            }</p>
<p style="margin:0;">            Panel1.Controls.Add(tbl);</p>
<p style="margin:0;"> </p>
<p style="margin:0;">        }</p>
<p style="margin:0;"> </p>
<p style="margin:0;">        protected void BtnGetValue_Click(object sender, EventArgs e)</p>
<p style="margin:0;">        {            </p>
<p style="margin:0;">            string Value = string.Empty;</p>
<p style="margin:0;">            Table tbl = (Table)Panel1.FindControl(&#8220;table123&#8243;);</p>
<p style="margin:0;">            for (int i = 0; i &lt; NumberOfControl ; i++)</p>
<p style="margin:0;">            {</p>
<p style="margin:0;">                TextBox txt = (TextBox ) tbl.FindControl(&#8220;DynamicTextBox&#8221; + i.ToString());</p>
<p style="margin:0;">                Value = Value + txt.Text + &#8221; &#8220;;</p>
<p style="margin:0;">            }</p>
<p style="margin:0;">            Label1.Text = Value;</p>
<p style="margin:0;">        } </p>
<p style="margin:0;"> </p>
<p style="margin:0;">        protected void BtnGenerateControl_Click(object sender, EventArgs e)</p>
<p style="margin:0;">        {</p>
<p style="margin:0;">            NumberOfControl = Int32.Parse(DropDownList1.SelectedValue);</p>
<p style="margin:0;">            GenerateControl();</p>
<p style="margin:0;">        }</p>
<p style="margin:0;">    }</p>
<p style="margin:0;">}</p>
<p> </p></div>
</div>
</div>
<p>or, download the whole solution code <a href="http://www.esnips.com/doc/ced94e17-96e7-4d6f-9dbc-d11ac1ecd289/20081023DynamicCreateControl">here </a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotnetsharepointwatever.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotnetsharepointwatever.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotnetsharepointwatever.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotnetsharepointwatever.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dotnetsharepointwatever.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dotnetsharepointwatever.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dotnetsharepointwatever.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dotnetsharepointwatever.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotnetsharepointwatever.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotnetsharepointwatever.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotnetsharepointwatever.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotnetsharepointwatever.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotnetsharepointwatever.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotnetsharepointwatever.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetsharepointwatever.wordpress.com&amp;blog=5275649&amp;post=3&amp;subd=dotnetsharepointwatever&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dotnetsharepointwatever.wordpress.com/2008/10/23/dynamicallyrun-time-create-control-and-access-the-entered-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b7ed5ddebbb6f0ef955cdd9e855f587?s=96&#38;d=identicon" medium="image">
			<media:title type="html">dotnetsharepointwatever</media:title>
		</media:content>
	</item>
	</channel>
</rss>
