<?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/"
	>

<channel>
	<title>techbits.de &#187; net</title>
	<atom:link href="http://www.techbits.de/tag/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.techbits.de</link>
	<description>thoughts on hardware, software, development and tech news</description>
	<lastBuildDate>Fri, 02 Dec 2011 22:51:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Preserving the state in dynamic asp.net usercontrols</title>
		<link>http://www.techbits.de/2007/01/04/preserving-the-state-in-dynamic-aspnet-usercontrols/</link>
		<comments>http://www.techbits.de/2007/01/04/preserving-the-state-in-dynamic-aspnet-usercontrols/#comments</comments>
		<pubDate>Thu, 04 Jan 2007 20:42:44 +0000</pubDate>
		<dc:creator>Florian</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[net]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[usercontrol]]></category>
		<category><![CDATA[viewstate]]></category>

		<guid isPermaLink="false">http://www.techbits.de/2007/01/04/preserving-the-state-in-dynamic-aspnet-usercontrols/</guid>
		<description><![CDATA[Phew 2007&#8230; my new years resolution includes writing more posts, but you know how these things go I recently struggled with the ascx user controls in asp .net v1.1. My problem was that when creating user controls dynamically, the state &#8230; <a href="http://www.techbits.de/2007/01/04/preserving-the-state-in-dynamic-aspnet-usercontrols/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Phew 2007&#8230; my new years resolution includes writing more posts, but you know how these things go <img src='http://www.techbits.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
<br />
I recently struggled with the ascx user controls in asp .net v1.1. My problem was that when creating user controls dynamically, the state was not preserved between postbacks and at first I couldn&#8217;t figure out why. Once I understood the process of the asp .net page request completely by reading through this informative article <a href="http://msdn2.microsoft.com/en-us/library/ms972976.aspx#viewstate_topic4">Understanding ASP.NET View State</a> I finally figured out the two essential things you have to do:</p>
<ul>
<li><b>Specify IDs for the dynamic controls.</b> If you just use Page.loadControl() and add the control to the page without defining it&#8217;s id, .net will not be able to save and restore it&#8217;s viewstate &#8211; so the ID is essential.</li>
<li><b>Recreate the user control on every page load (post back).</b> Even though .net stores the viewstate information when you provided the ID, the user controls will not survive a post back &#8211; this is by design. So it&#8217;s your responsibility to recreate your user controls on page load which means you have to know the control (path to ascx-file) with it&#8217;s corresponding ID and restore those.</li>
<p> An example can be found in the aspnet4you article <a href="http://www.aspnet4you.com/articles.aspx?articleid=5032">Dynamic Loading of User Control with ViewState Preserved</a>.
</ul>
<p>When I finally got that, I developed a modified PlaceHolder-Control, which encapsulates the dynamic loading and reloading of viewstate enabled user controls. I currently don&#8217;t have a decent version to post here, though.<br />
<br />
Btw, I just updated the <a href="http://www.techbits.de/projects/sql-script-creator/">SQL Script Creator project page</a> with a slightly changed version 1.0.1 and also uploaded the source code. The program is now officially open sourced under the GPL.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techbits.de/2007/01/04/preserving-the-state-in-dynamic-aspnet-usercontrols/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Script Creator released</title>
		<link>http://www.techbits.de/2006/06/26/sql-script-creator-released/</link>
		<comments>http://www.techbits.de/2006/06/26/sql-script-creator-released/#comments</comments>
		<pubDate>Mon, 26 Jun 2006 20:54:58 +0000</pubDate>
		<dc:creator>Florian</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[net]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.techbits.de/2006/06/26/sql-script-creator-released/</guid>
		<description><![CDATA[I continued the development of my SQL Script Creator and have just put up a setup package on it&#8217;s project page. It is a handy tool to create a sql script from query meta data based on several templates and &#8230; <a href="http://www.techbits.de/2006/06/26/sql-script-creator-released/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a class="imagelink" href="http://www.techbits.de/wp-content/uploads/2006/06/ssc_small1.jpg" title="New Version of SQL Script Creator Logo"><img id="image39" style="float:right;" src="http://www.techbits.de/wp-content/uploads/2006/06/ssc_small1.thumbnail.jpg" alt="New Version of SQL Script Creator Logo" /></a><br />
I continued the development of my <a href="http://www.techbits.de/projects/sql-script-creator/">SQL Script Creator</a> and have just put up a setup package on it&#8217;s <a href="http://www.techbits.de/projects/sql-script-creator/">project page</a>. It is a handy tool to create a sql script from query meta data based on several templates and can save you quite some time when working with temporary tables or cursors in SQL Server.<br />
<br />
Meanwhile I found a similar opensource program which is called <a href="http://www.icodegenerator.net/main/">iCodeGenerator</a> which uses user editable templates to create custom scripts and code but it bases it&#8217;s generation on a table rather than a more customizable select query.<br />
<br />
In case you are wondering: The splashscreen design is drawn by hand with a graphic tablet &#8211; it gave me the chance to try some brush effects. It is no coincidence that the content resembles the SQL Server 2005 splash screen in a more &#8220;handmade&#8221; style <img src='http://www.techbits.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.techbits.de/2006/06/26/sql-script-creator-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

