<?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>Adrenalin &#187; c#</title>
	<atom:link href="http://a.drenal.in/tag/c/feed" rel="self" type="application/rss+xml" />
	<link>http://a.drenal.in</link>
	<description>Stimulants on the Internet, Programming and Photography</description>
	<lastBuildDate>Thu, 29 Oct 2009 15:02:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Redirection in a Page with Validation Objects</title>
		<link>http://a.drenal.in/programming/c-sharp-and-dot-net/redirection-in-a-page-with-validation-objects.html</link>
		<comments>http://a.drenal.in/programming/c-sharp-and-dot-net/redirection-in-a-page-with-validation-objects.html#comments</comments>
		<pubDate>Fri, 26 Dec 2008 09:12:04 +0000</pubDate>
		<dc:creator>Keefe Dunn</dc:creator>
				<category><![CDATA[C# and .NET]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[causesvalidation]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[validator]]></category>

		<guid isPermaLink="false">http://enl.iten.me/programming/c-sharp-and-dot-net/redirection-in-a-page-with-validation-objects.html</guid>
		<description><![CDATA[I’ve been up to a new C# with ASP.NET project lately, and I plan to record down the problems occurred along the development, of course, with solutions.
Here is the first one, about Redirection and Validation. It’s pretty simple, or, I should say amateur. You got it, amateur is who I am. ^^
 
I encountered this [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been up to a new C# with ASP.NET project lately, and I plan to record down the problems occurred along the development, of course, with solutions.</p>
<p>Here is the first one, about Redirection and Validation. It’s pretty simple, or, I should say amateur. You got it, amateur is who I am. ^^</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" src="http://img380.imageshack.us/img380/4981/17247395fb535133c1xn6.jpg" /> </p>
<p>I encountered this problem that, Okay, here comes the</p>
<p><strong>Problem Description</strong></p>
<p>I’ve got a Button object with OnClick Event in page1, which, when clicked, Response.Redirect to page2. Meanwhile, I have some Validator objects in page1, too. The thing is, the client-side Validation occurs before even reaching the Event for the Button. That is to say, the Validators prevent Redirection from happening.</p>
<p><strong>Solution</strong></p>
<p>You'll love this because it’s so easy. In the Button's properties list, find &quot;CausesValidation&quot; and set it to <strong>false</strong>. That’s it.</p>
<p>My thought is, there’s always some property control if an operation is generated on the server-side.</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:13bab48a-12d9-4f31-95ad-29866aef3317" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/c%23" rel="tag">c#</a>,<a href="http://technorati.com/tags/asp.net" rel="tag">asp.net</a>,<a href="http://technorati.com/tags/redirect" rel="tag">redirect</a>,<a href="http://technorati.com/tags/validator" rel="tag">validator</a>,<a href="http://technorati.com/tags/causesvalidation" rel="tag">causesvalidation</a></div>
<img src="http://a.drenal.in/?ak_action=api_record_view&id=345&type=feed" alt="" />

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://a.drenal.in/programming/c-sharp-and-dot-net/redirection-in-a-page-with-validation-objects.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Displaying DateTime Object as Desired</title>
		<link>http://a.drenal.in/programming/c-sharp-and-dot-net/displaying-datetime-object-as-desired.html</link>
		<comments>http://a.drenal.in/programming/c-sharp-and-dot-net/displaying-datetime-object-as-desired.html#comments</comments>
		<pubDate>Tue, 09 Dec 2008 11:32:30 +0000</pubDate>
		<dc:creator>Keefe Dunn</dc:creator>
				<category><![CDATA[C# and .NET]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[datetime]]></category>
		<category><![CDATA[format]]></category>

		<guid isPermaLink="false">http://enl.iten.me/programming/c-sharp-and-dot-net/displaying-datetime-object-as-desired.html</guid>
		<description><![CDATA[DateTime is a common type we deal with frequently in the development of C#-ASP.NET project. As a result, how to display a DateTime object properly is the knowledge we have to know as a web service developer.
 
In the following paragraphs, I made a summary of formatting DateTime object in several circumstances to get it [...]]]></description>
			<content:encoded><![CDATA[<p>DateTime is a common type we deal with frequently in the development of C#-ASP.NET project. As a result, how to display a DateTime object properly is the knowledge we have to know as a web service developer.</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" height="451" src="http://img296.imageshack.us/img296/9273/kfotdnnf9sgu2.jpg" width="600" /> </p>
<p>In the following paragraphs, I made a summary of formatting DateTime object in several circumstances to get it displayed as needed:</p>
<ul>
<li>Format DateTime string retrieved from database and to be binded to Data Controls.      <br /> 
<div class="source" style="font-family: &#39;[object]&#39;,&#39;Consolas&#39;,&#39;Lucida Console&#39;,&#39;Courier New&#39;; background-color: #2f4f4f" jquery1228821151210="2"><span class="lineno" style="color: #da70d6"></span><span style="color: #f5deb3">&lt;</span><span style="color: #f5deb3">ASP</span><span style="color: #f5deb3">:</span><span style="color: #f5deb3">BoundColumn</span><span style="color: #f5deb3"> </span><span style="color: #f5deb3">DataField</span><span style="color: #f5deb3">=</span><span style="color: #7fffd4">&quot;JoinTime&quot;</span><span style="color: #f5deb3"> </span><span style="color: #f5deb3">DataFormatString</span><span style="color: #f5deb3">=</span><span style="color: #7fffd4">&quot;{0:yyyy-MM-dd}&quot;</span><span style="color: #f5deb3"> </span><span style="color: #f5deb3">&gt;</span>         <br /><span class="lineno" style="color: #da70d6"></span><span style="color: #f5deb3">&lt;/</span><span style="color: #f5deb3">ASP</span><span style="color: #f5deb3">:</span><span style="color: #f5deb3">BoundColumn</span><span style="color: #f5deb3">&gt;</span><span style="color: #f5deb3"> </span>        <br /><span style="color: #f5deb3">&lt;ASP</span><span style="color: #f5deb3">:</span><span style="color: #f5deb3">BoundColumn</span><span style="color: #f5deb3"> </span><span style="color: #f5deb3">DataField</span><span style="color: #f5deb3">=</span><span style="color: #7fffd4">&quot;CheckoutTime&quot; </span><span style="color: #f5deb3">DataFormatString</span><span style="color: #f5deb3">=</span><span style="color: #7fffd4">&quot;{0:yyyy-MM-dd HH24:mm:ss}&quot;</span><span style="color: #f5deb3">&gt;</span><span style="color: #f5deb3"></span>         <br /><span class="lineno special" style="color: #f810b0"></span><span style="color: #f5deb3">&lt;/</span><span style="color: #f5deb3">asp</span><span style="color: #f5deb3">:</span><span style="color: #f5deb3">BoundColumn</span><span style="color: #f5deb3">&gt;</span><span style="color: #f5deb3"></span>         </div>
<p></li>
<li>Statement in the CodeFile to get a DateTime string.      <br /> 
<div class="source" style="font-family: &#39;[object]&#39;,&#39;Consolas&#39;,&#39;Lucida Console&#39;,&#39;Courier New&#39;; background-color: #2f4f4f" jquery1228820561431="2"><span class="lineno" style="color: #da70d6"></span><span style="color: #f5deb3">e</span><span style="color: #f5deb3">.</span><span style="color: #f5deb3">Item</span><span style="color: #f5deb3">.</span><span style="color: #f5deb3">Cell</span><span style="color: #f5deb3">[</span><span style="color: #add8e6">0</span><span style="color: #f5deb3">].</span><span style="color: #f5deb3">Text</span><span style="color: #f5deb3"> </span><span style="color: #f5deb3">=</span><span style="color: #f5deb3"> </span><span style="color: #f5deb3">Convert</span><span style="color: #f5deb3">.</span><span style="color: #f5deb3">ToDateTime</span><span style="color: #f5deb3">(</span><span style="color: #f5deb3">e</span><span style="color: #f5deb3">.</span><span style="color: #f5deb3">Item</span><span style="color: #f5deb3">.</span><span style="color: #f5deb3">Cell</span><span style="color: #f5deb3">[</span><span style="color: #add8e6">0</span><span style="color: #f5deb3">].</span><span style="color: #f5deb3">Text</span><span style="color: #f5deb3">).</span><span style="color: #f5deb3">ToShortDateString</span><span style="color: #f5deb3">();</span><span style="color: #f5deb3"></span>         </div>
<p></li>
<li>With the help of String class.      <br /> 
<div class="source" style="font-family: &#39;[object]&#39;,&#39;Consolas&#39;,&#39;Lucida Console&#39;,&#39;Courier New&#39;; background-color: #2f4f4f" jquery1228820742125="2"><span class="lineno" style="color: #da70d6"></span><span style="color: #f5deb3">String</span><span style="color: #f5deb3">.</span><span style="color: #f5deb3">Format</span><span style="color: #f5deb3">(</span><span style="color: #f5deb3"> </span><span style="color: #7fffd4">&quot;yyyy-MM-dd &quot;</span><span style="color: #f5deb3">, the</span><span style="color: #f5deb3">DateTimeObj</span><span style="color: #f5deb3">);</span><span style="color: #f5deb3"></span>         </div>
<p></li>
<li>With the help of Convert method.      <br /> 
<div class="source" style="font-family: &#39;[object]&#39;,&#39;Consolas&#39;,&#39;Lucida Console&#39;,&#39;Courier New&#39;; background-color: #2f4f4f" jquery1228821216875="2"><span class="lineno" style="color: #da70d6"></span><span style="color: #f5deb3">Convert</span><span style="color: #f5deb3">.</span><span style="color: #f5deb3">ToDateTime</span><span style="color: #f5deb3">(</span><span style="color: #7fffd4">&quot;2008-12-09&quot;</span><span style="color: #f5deb3">).</span><span style="color: #f5deb3">ToString</span><span style="color: #f5deb3">;</span><span style="color: #f5deb3"></span>         <br /><span class="lineno" style="color: #da70d6"></span><span style="color: #f5deb3">Convert</span><span style="color: #f5deb3">.</span><span style="color: #f5deb3">ToDateTime</span><span style="color: #f5deb3">(</span><span style="color: #f5deb3">dr</span><span style="color: #f5deb3">[</span><span style="color: #7fffd4">&quot;PubDate&quot;</span><span style="color: #f5deb3">]).</span><span style="color: #f5deb3">ToShortDateString</span><span style="color: #f5deb3">();</span><span style="color: #f5deb3"></span>         </div>
<p></li>
<li>ToString method of DateTime class.      <br /> 
<div class="source" style="font-family: &#39;[object]&#39;,&#39;Consolas&#39;,&#39;Lucida Console&#39;,&#39;Courier New&#39;; background-color: #2f4f4f" jquery1228821009957="2"><span class="lineno" style="color: #da70d6"></span><span style="color: #f5deb3">DateTime</span><span style="color: #f5deb3">.</span><span style="color: #f5deb3">Now</span><span style="color: #f5deb3">.</span><span style="color: #f5deb3">ToString</span><span style="color: #f5deb3">(</span><span style="color: #7fffd4">&quot;yyyyMMddhhmmss&quot;</span><span style="color: #f5deb3">);</span><span style="color: #f5deb3"></span>         <br /><span class="lineno" style="color: #da70d6"></span><span style="color: #f5deb3">DateTime</span><span style="color: #f5deb3">.</span><span style="color: #f5deb3">Now</span><span style="color: #f5deb3">.</span><span style="color: #f5deb3">ToString</span><span style="color: #f5deb3">(</span><span style="color: #7fffd4">&quot;yyyy/MM/dd hh:mm:ss&quot;</span><span style="color: #f5deb3">); </span>        </div>
<p></li>
<li>Show only year and month.      <br /> 
<div class="source" style="font-family: &#39;[object]&#39;,&#39;Consolas&#39;,&#39;Lucida Console&#39;,&#39;Courier New&#39;; background-color: #2f4f4f" jquery1228821104252="2"><span class="lineno" style="color: #da70d6"></span><span style="color: #f5deb3">DataBinder</span><span style="color: #f5deb3">.</span><span style="color: #f5deb3">Eval</span><span style="color: #f5deb3">(</span><span style="color: #f5deb3">Container</span><span style="color: #f5deb3">.</span><span style="color: #f5deb3">DataItem</span><span style="color: #f5deb3">,</span><span style="color: #7fffd4">&quot;starttime&quot;</span><span style="color: #f5deb3">,</span><span style="color: #7fffd4">&quot;{0:yyyy-MM}&quot;</span><span style="color: #f5deb3">);</span><span style="color: #f5deb3"></span>         </div>
</li>
</ul>
<p> 
<p>Certainly, there are more situations when you have to format a DateTime object, and the rules could be deduced from above.</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:690ecc46-9a20-49e3-a6a2-ceaa47681cdc" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/datetime" rel="tag">datetime</a>,<a href="http://technorati.com/tags/format" rel="tag">format</a>,<a href="http://technorati.com/tags/c%23" rel="tag">c#</a></div>
<img src="http://a.drenal.in/?ak_action=api_record_view&id=338&type=feed" alt="" />

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://a.drenal.in/programming/c-sharp-and-dot-net/displaying-datetime-object-as-desired.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic Tree Construction according to User Role and Page</title>
		<link>http://a.drenal.in/featured/dynamic-tree-construction-according-to-user-role-and-page.html</link>
		<comments>http://a.drenal.in/featured/dynamic-tree-construction-according-to-user-role-and-page.html#comments</comments>
		<pubDate>Fri, 14 Nov 2008 05:38:41 +0000</pubDate>
		<dc:creator>Keefe Dunn</dc:creator>
				<category><![CDATA[C# and .NET]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[dynamic data binding]]></category>
		<category><![CDATA[dynamic tree construction]]></category>
		<category><![CDATA[user role]]></category>

		<guid isPermaLink="false">http://ralphdunn.com/featured/dynamic-tree-construction-according-to-user-role-and-page.html</guid>
		<description><![CDATA[In the developing environment of C# and .NET, dynamic data binding isn’t anything new at all. I’m here just to make a summary of how to do the job to a TreeView object, and add a few contents depending on my practical experience.
Keywords: dynamic tree construction, user role, page.
Problem Description
In the classic three-layer architecture adopted [...]]]></description>
			<content:encoded><![CDATA[<p>In the developing environment of C# and .NET, dynamic data binding isn’t anything new at all. I’m here just to make a summary of how to do the job to a TreeView object, and add a few contents depending on my practical experience.</p>
<p>Keywords: dynamic tree construction, user role, page.</p>
<p><strong>Problem Description</strong></p>
<p>In the classic three-layer architecture adopted by my project, we have</p>
<p>1. data tables that are dealt with by a DAL-located class database.cs;</p>
<p>2. a series of corresponding BLL classes to manipulate data retrieved from those tables;</p>
<p>3. aspx pages and aspx.cs code files in the presentation layer.</p>
<p>which means following elements are involved:</p>
<p>1. data table User, UserRole, RoleTree;</p>
<p>2. class User.cs, UserRole.cs, RoleTree.cs;</p>
<p>3. example page sampleTree.aspx and its code file sampleTree.aspx.cs.</p>
<p>A picture speaks more than a thousand words. Let’s first take a look at the chart below to get an overview of how this work is going to be done.</p>
<p><a title="click to see larger picture" href="http://i33.tinypic.com/rk5u0y.jpg" target="_blank"><img style="display: block; float: none; margin-left: auto; margin-right: auto" height="286" src="http://i33.tinypic.com/rk5u0y.jpg" width="500" /></a> </p>
<p><strong>Solution Pt1: User Login</strong></p>
<p>By the input username and password, we first get the userId, through which user role(s) are obtained and stored in a Session object. In case of more than one role for a specific user, we take an ArrayList as the role container.</p>
<div class="source" style="font-family: &#39;Courier New&#39;,&#39;Consolas&#39;,&#39;Lucida Console&#39;; background-color: #cdeb8b" jquery1226631243265="2"><span class="lineno" style="color: #008000"></span><span style="color: #0000ff">if</span> (Page.IsValid)     <br /><span class="lineno" style="color: #008000"></span><span style="color: #0000ff">{</span>     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160; User usr = <span style="color: #0000ff">new</span> User();     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160; <span style="color: #2b91af">string</span> userId = <span style="color: #a31515">&quot;&quot;</span>;     <br /><span class="lineno special"></span>&#160;&#160;&#160; SqlDataReader recs = usr.GetUserLogin(txtUserName.Text.Trim(), txtPassword.Text.Trim());     <br /><span class="lineno" style="color: #008000"></span>    <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160; <span style="color: #0000ff">if</span> (recs.Read())     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160; <span style="color: #0000ff">{</span>     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; userId = recs[<span style="color: #a31515">&quot;UserID&quot;</span>].ToString();     <br /><span class="lineno special"></span>&#160;&#160;&#160; <span style="color: #0000ff">}</span>     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160; recs.Close();     <br /><span class="lineno" style="color: #008000"></span>    <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160; <span style="color: #0000ff">if</span> ((userId != String.Empty) &amp;&amp; (userId != <span style="color: #a31515">&quot;&quot;</span>))     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160; <span style="color: #0000ff">{</span>     <br /><span class="lineno special"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #008000">// get user roles, put them into session</span>     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; ArrayList alRoleIDs = <span style="color: #0000ff">new</span> ArrayList();     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; UserRole ur = <span style="color: #0000ff">new</span> UserRole();     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; SqlDataReader dr = ur.GetRoleByUserID(Int32.Parse(userId));     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">while</span> (dr.Read())     <br /><span class="lineno special"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">{</span>     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; alRoleIDs.Add(Int32.Parse(dr[<span style="color: #a31515">&quot;RoleID&quot;</span>].ToString()));     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">}</span>     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Session.Add(<span style="color: #a31515">&quot;RoleIDs&quot;</span>, alRoleIDs);     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; dr.Close();     <br /><span class="lineno special"></span>&#160;&#160;&#160; <span style="color: #0000ff">}</span>     </div>
<p><strong>Solution Pt2: Tree Construction</strong></p>
<p>Then we take the RoleIDs of ArralyList above and some PageID of int as arguments to get the tree. Codes below are sample codes from sampleTree.aspx.cs:</p>
<div class="source" style="font-family: &#39;Courier New&#39;,&#39;Consolas&#39;,&#39;Lucida Console&#39;; background-color: #cdeb8b" jquery1226632327406="2"><span class="lineno" style="color: #008000"></span><span style="color: #0000ff">protected</span> <span style="color: #0000ff">void</span> Page_Load(<span style="color: #2b91af">object</span> sender, EventArgs e)     <br /><span class="lineno" style="color: #008000"></span><span style="color: #0000ff">{</span>     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160; <span style="color: #0000ff">if</span> (!Page.IsPostBack)     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160; <span style="color: #0000ff">{</span>     <br /><span class="lineno special"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; BindTreeData(treeSidebar, (ArrayList)Session[<span style="color: #a31515">&quot;RoleIDs&quot;</span>]);     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160; <span style="color: #0000ff">}</span>     <br /><span class="lineno" style="color: #008000"></span><span style="color: #0000ff">}</span>     <br /><span class="lineno" style="color: #008000"></span>    <br /><span class="lineno" style="color: #008000"></span><span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> BindTreeData(TreeView tv, ArrayList al)     <br /><span class="lineno special"></span><span style="color: #0000ff">{</span>     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160; RoleTree rt = <span style="color: #0000ff">new</span> RoleTree();     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160; <span style="color: #008000">// when applied to different pages, take RoleIDs of ArrayList and PageID of int as arguments</span>     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160; DataTable dt = rt.GetTreeByRoleIDandPageID(al, 3); <span style="color: #008000">// 3 is an exmaple of pageId</span>     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160; tv.Nodes.Clear();     <br /><span class="lineno special"></span>    <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160; <span style="color: #0000ff">foreach</span> (DataRow row <span style="color: #0000ff">in</span> dt.Select())     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160; <span style="color: #0000ff">{</span>     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; TreeNode tempNode = <span style="color: #0000ff">new</span> TreeNode();     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; tempNode.Text = row[<span style="color: #a31515">&quot;Title&quot;</span>].ToString();     <br /><span class="lineno special"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; tempNode.Value = row[<span style="color: #a31515">&quot;NodeID&quot;</span>].ToString();     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; tempNode.Expanded = <span style="color: #0000ff">false</span>;     <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; tempNode.NavigateUrl = row[<span style="color: #a31515">&quot;Url&quot;</span>].ToString();     <br /><span class="lineno" style="color: #008000"></span>    <br /><span class="lineno" style="color: #008000"></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; tv.Nodes.Add(tempNode);     <br /><span class="lineno special"></span>&#160;&#160;&#160; <span style="color: #0000ff">}</span>     <br /><span class="lineno" style="color: #008000"></span><span style="color: #0000ff">}</span>     </div>
<p><strong>Further Notice</strong></p>
<p>//It is especially useful when applied to MasterPages.</p>
<p>//This solution does not take node's parent into account, which means the TreeView object constructed is not a real tree, strictly speaking.</p>
<img src="http://a.drenal.in/?ak_action=api_record_view&id=323&type=feed" alt="" />

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://a.drenal.in/featured/dynamic-tree-construction-according-to-user-role-and-page.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
