<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Programmers World</title>
    <link rel="alternate" type="text/html" href="http://blog.lib.umn.edu/janewang/programmersworld/" />
    <link rel="self" type="application/atom+xml" href="http://blog.lib.umn.edu/janewang/programmersworld/atom.xml" />
   <id>tag:blog.lib.umn.edu,2009:/janewang/programmersworld//3743</id>
    <link rel="service.post" type="application/atom+xml" href="http://blog.lib.umn.edu/cgi-bin/mt-atom.cgi/weblog/blog_id=3743" title="Programmers World" />
    <updated>2007-04-11T17:06:11Z</updated>
    <subtitle></subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.25</generator>
 

<entry>
    <title>Custom Server Controls vs User Control</title>
    <link rel="alternate" type="text/html" href="http://blog.lib.umn.edu/janewang/programmersworld/2007/04/custom_server_controls_vs_user.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blog.lib.umn.edu/cgi-bin/mt-atom.cgi/weblog/blog_id=3743/entry_id=75997" title="Custom Server Controls vs User Control" />
    <id>tag:blog.lib.umn.edu,2007:/janewang/programmersworld//3743.75997</id>
    
    <published>2007-04-11T16:56:36Z</published>
    <updated>2007-04-11T17:06:11Z</updated>
    
    <summary>Custom controls compile to their own .dll file and can be used across applications. User controls are limited to a single application. Custom controls require no additional files beyond the .dll and are completely compiled. User control must be deployed...</summary>
    <author>
        <name>Jane Wang</name>
        <uri></uri>
    </author>
    
        <category term="ASP.NET" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.lib.umn.edu/janewang/programmersworld/">
        <![CDATA[<p>Custom controls compile to their own .dll file and can be used across applications.<br />
User controls are limited to a single application.</p>

<p>Custom controls require no additional files beyond the .dll and are completely compiled.<br />
User control must be deployed as an .ascx file, and the source code in the .ascx file will be visible to anyone with rights to view the files on the web server.</p>

<p>Custom controls can be display a design-time user interface that mimics what will be displayed at runtime.<br />
User controls are always rendered as generic gray box.</p>

<p>Custom controls can be sized visually. <br />
User controls can be sized only by setting properities.</p>

<p>Code to handle events exposed by custom controls can be largely generated automatically by VS.NET.<br />
You will need to add all code by hand to handle an event exposed by a user control.</p>

<p>Tips<br />
One should use a user control when reuse is only across a project. <br />
When the control is used in a second project, take a few hours and turn it into a custom control.</p>]]>
        
    </content>
</entry>

<entry>
    <title>RadioButtonList &amp; SelectedValue</title>
    <link rel="alternate" type="text/html" href="http://blog.lib.umn.edu/janewang/programmersworld/2007/04/radiobuttonlist_selectedvalue.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blog.lib.umn.edu/cgi-bin/mt-atom.cgi/weblog/blog_id=3743/entry_id=75808" title="RadioButtonList &amp; SelectedValue" />
    <id>tag:blog.lib.umn.edu,2007:/janewang/programmersworld//3743.75808</id>
    
    <published>2007-04-10T14:16:37Z</published>
    <updated>2007-04-10T14:20:21Z</updated>
    
    <summary>Before you want to use SelectedValue, you got to check if there is any item selected. if(rblGrade.SelectedIndex != -1) { alValues.Add(rblGrade.SelectedItem.Value); } Before you set SelectedValue, you need to check if it is null. if(dr[&quot;gender&quot;] != DBNull.Value) { rblGender.SelectedValue =...</summary>
    <author>
        <name>Jane Wang</name>
        <uri></uri>
    </author>
    
        <category term="ASP.NET" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.lib.umn.edu/janewang/programmersworld/">
        <![CDATA[<p>Before you want to use SelectedValue, you got to check if there is any item selected.</p>

<p>if(rblGrade.SelectedIndex != -1)<br />
{<br />
   alValues.Add(rblGrade.SelectedItem.Value);<br />
}</p>

<p><br />
Before you set SelectedValue, you need to check if it is null.</p>

<p>if(dr["gender"] != DBNull.Value)<br />
{<br />
          rblGender.SelectedValue = dr["gender"].ToString();<br />
}</p>]]>
        
    </content>
</entry>

<entry>
    <title>DataGrid -- With Template &amp; Total Line</title>
    <link rel="alternate" type="text/html" href="http://blog.lib.umn.edu/janewang/programmersworld/2006/08/datagrid_with_template_total_l.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blog.lib.umn.edu/cgi-bin/mt-atom.cgi/weblog/blog_id=3743/entry_id=50641" title="DataGrid -- With Template &amp; Total Line" />
    <id>tag:blog.lib.umn.edu,2006:/janewang/programmersworld//3743.50641</id>
    
    <published>2006-08-15T19:04:57Z</published>
    <updated>2006-08-15T19:13:43Z</updated>
    
    <summary>http://www.extremeexperts.com/Net/Articles/AddingControlstoFooter.aspx http://localhost/JaneWeb/FFA/CDE/admin/CDEReportBySchool.aspx?type=fall The key point is to overwrite ItemCreated event handler, and then design a proper footer with computed data in it. http://aspalliance.com/494...</summary>
    <author>
        <name>Jane Wang</name>
        <uri></uri>
    </author>
    
        <category term="ASP.NET" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.lib.umn.edu/janewang/programmersworld/">
        <![CDATA[<p><a href="http://www.extremeexperts.com/Net/Articles/AddingControlstoFooter.aspx">http://www.extremeexperts.com/Net/Articles/AddingControlstoFooter.aspx</a></p>

<p><a href="http://localhost/JaneWeb/FFA/CDE/admin/CDEReportBySchool.aspx?type=fall">http://localhost/JaneWeb/FFA/CDE/admin/CDEReportBySchool.aspx?type=fall</a></p>

<p>The key point is to overwrite <strong>ItemCreated</strong> event handler, and then design a proper footer with computed data in it.</p>

<p><a href="http://aspalliance.com/494">http://aspalliance.com/494</a></p>]]>
        
    </content>
</entry>

<entry>
    <title>Professional Connection</title>
    <link rel="alternate" type="text/html" href="http://blog.lib.umn.edu/janewang/programmersworld/2006/08/professional_connection.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blog.lib.umn.edu/cgi-bin/mt-atom.cgi/weblog/blog_id=3743/entry_id=49816" title="Professional Connection" />
    <id>tag:blog.lib.umn.edu,2006:/janewang/programmersworld//3743.49816</id>
    
    <published>2006-08-02T19:35:12Z</published>
    <updated>2006-08-02T19:36:02Z</updated>
    
    <summary>www.theculturalconnect.com...</summary>
    <author>
        <name>Jane Wang</name>
        <uri></uri>
    </author>
    
        <category term="Social" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.lib.umn.edu/janewang/programmersworld/">
        <![CDATA[<p><a href="http://www.theculturalconnect.com">www.theculturalconnect.com</a></p>]]>
        
    </content>
</entry>

<entry>
    <title>Form Authentication</title>
    <link rel="alternate" type="text/html" href="http://blog.lib.umn.edu/janewang/programmersworld/2006/07/form_authentication.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blog.lib.umn.edu/cgi-bin/mt-atom.cgi/weblog/blog_id=3743/entry_id=49487" title="Form Authentication" />
    <id>tag:blog.lib.umn.edu,2006:/janewang/programmersworld//3743.49487</id>
    
    <published>2006-07-26T20:38:23Z</published>
    <updated>2006-08-09T19:14:17Z</updated>
    
    <summary>http://www.xoc.net/works/tips/forms-authentication.asp http://www.codeproject.com/aspnet/formsroleauth.asp...</summary>
    <author>
        <name>Jane Wang</name>
        <uri></uri>
    </author>
    
        <category term="ASP.Net Resources" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.lib.umn.edu/janewang/programmersworld/">
        <![CDATA[<p><a href="http://www.xoc.net/works/tips/forms-authentication.asp">http://www.xoc.net/works/tips/forms-authentication.asp</a></p>

<p><a href="http://www.codeproject.com/aspnet/formsroleauth.asp">http://www.codeproject.com/aspnet/formsroleauth.asp</a></p>]]>
        
    </content>
</entry>

<entry>
    <title>As a working mom, think about this ...</title>
    <link rel="alternate" type="text/html" href="http://blog.lib.umn.edu/janewang/programmersworld/2006/07/as_a_working_mom_think_about_t.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blog.lib.umn.edu/cgi-bin/mt-atom.cgi/weblog/blog_id=3743/entry_id=49407" title="As a working mom, think about this ..." />
    <id>tag:blog.lib.umn.edu,2006:/janewang/programmersworld//3743.49407</id>
    
    <published>2006-07-25T18:39:32Z</published>
    <updated>2006-07-25T18:40:18Z</updated>
    
    <summary>â€œIf you surrender completely to the moments as they pass, you live more richly in those moments.â€? Anne Morrow Lingbergh...</summary>
    <author>
        <name>Jane Wang</name>
        <uri></uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://blog.lib.umn.edu/janewang/programmersworld/">
        <![CDATA[<p>â€œIf you surrender completely to the moments as they pass, you live more richly in those moments.â€?</p>

<p>Anne Morrow Lingbergh</p>]]>
        
    </content>
</entry>

<entry>
    <title>Build dynamic controls upon administrors configuration</title>
    <link rel="alternate" type="text/html" href="http://blog.lib.umn.edu/janewang/programmersworld/2006/07/build_dynamic_controls_upon_ad.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blog.lib.umn.edu/cgi-bin/mt-atom.cgi/weblog/blog_id=3743/entry_id=49218" title="Build dynamic controls upon administrors configuration" />
    <id>tag:blog.lib.umn.edu,2006:/janewang/programmersworld//3743.49218</id>
    
    <published>2006-07-21T15:00:46Z</published>
    <updated>2006-07-21T15:17:49Z</updated>
    
    <summary>I&apos;ve been working on an application which have event date time on all pages. This of course should be changed every year. And the allowance for each event might be different year to year too. As a support person, I...</summary>
    <author>
        <name>Jane Wang</name>
        <uri></uri>
    </author>
    
        <category term="ASP.NET" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.lib.umn.edu/janewang/programmersworld/">
        <![CDATA[<p>I've been working on an application which have event date time on all pages. This of course should be changed every year. And the allowance for each event might be different year to year too. As a support person, I am just tired of these tedious things. I'd rather build a new one for them.</p>

<p>In the new system, the admin would have the ability to configure the application by himself. This would include date and time of the events, how many teams are allowed for each school and how many members for each team. And the cool thing is all the other public registration pages and reports would be changed immediately. I don't need to go through all of them and change one by one. I don't need to worry about that I still might forget some which are supposed to be changed even though I've been tried hard. You know what? Relief!!! That's what I feel right now even though there is still a long way to finish all my coding. But I already pass the most hard part. Yeah!<br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>Apply template in .net applications</title>
    <link rel="alternate" type="text/html" href="http://blog.lib.umn.edu/janewang/programmersworld/2006/07/apply_template_in_net_applicat.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blog.lib.umn.edu/cgi-bin/mt-atom.cgi/weblog/blog_id=3743/entry_id=49214" title="Apply template in .net applications" />
    <id>tag:blog.lib.umn.edu,2006:/janewang/programmersworld//3743.49214</id>
    
    <published>2006-07-21T14:37:38Z</published>
    <updated>2006-07-21T14:59:43Z</updated>
    
    <summary>Want to let your pages have identical look? Yah, why not? But how? My first attempt is to use web user controls at top, bottom and also having one for side menu. It works! My customers like my design. So...</summary>
    <author>
        <name>Jane Wang</name>
        <uri></uri>
    </author>
    
        <category term="ASP.NET" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.lib.umn.edu/janewang/programmersworld/">
        <![CDATA[<p>Want to let your pages have identical look? Yah, why not? But how?</p>

<p>My first attempt is to use web user controls at top, bottom and also having one for side menu. It works! My customers like my design. So what's wrong I have to look for another alternative?</p>

<p>The problem with this implementation is I have to register all the user controls in every aspx pages and create properate tags for each of them. When you have many pages in your application, you could image how bothering this could be! Plus this is costly for future maintenance.</p>

<p>I got to find another way to do this, I told myself. And I diving into my R&D world. Finally I find one which is easy to implement and easy to apply. I am so excited!!!!</p>

<p>Here is the way. You implement a master page with all fancy looks you want, header, footer, side menus. And then all other page inherit it instead of Page.  That's it! Sound easy? Yes. I do satisified with this one.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Create X Number of TextBox at Runtime</title>
    <link rel="alternate" type="text/html" href="http://blog.lib.umn.edu/janewang/programmersworld/2006/07/create_x_number_of_textbox_at.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blog.lib.umn.edu/cgi-bin/mt-atom.cgi/weblog/blog_id=3743/entry_id=49109" title="Create X Number of TextBox at Runtime" />
    <id>tag:blog.lib.umn.edu,2006:/janewang/programmersworld//3743.49109</id>
    
    <published>2006-07-19T15:15:47Z</published>
    <updated>2006-07-21T14:59:43Z</updated>
    
    <summary>http://www.artisticode.com/Downloads/154.aspx ----------------------------------- Below is the contribution I made------------------------------------------ Clean Up when the number of textbox was changed By ? on Wednesday, July 19, 2006 (PST) If we don&apos;t cleanup everytime when the requrested number of textbox was changed, error or...</summary>
    <author>
        <name>Jane Wang</name>
        <uri></uri>
    </author>
    
        <category term="ASP.NET" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.lib.umn.edu/janewang/programmersworld/">
        <![CDATA[<p>http://www.artisticode.com/Downloads/154.aspx</p>

<p>----------------------------------- Below is the contribution I made------------------------------------------</p>

<p>Clean Up when the number of textbox was changed <br />
By ? on Wednesday, July 19, 2006 (PST)  <br />
If we don't cleanup everytime when the requrested number of textbox was changed, error or messy would be expected. Below is my solution:</p>

<p>private void cleanUp()</p>

<p>{</p>

<p>TextBoxesHere.Controls.Clear();</p>

<p>ltlReturnData.Text = "";</p>

<p>}</p>

<p>private void txtTBCount_TextChanged(object sender, System.EventArgs e)</p>

<p>{</p>

<p>cleanUp();</p>

<p>}</p>

<p> <br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>.NET and FireFox &amp; Netscape</title>
    <link rel="alternate" type="text/html" href="http://blog.lib.umn.edu/janewang/programmersworld/2006/07/net_and_firefox_netscape.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blog.lib.umn.edu/cgi-bin/mt-atom.cgi/weblog/blog_id=3743/entry_id=48981" title=".NET and FireFox &amp; Netscape" />
    <id>tag:blog.lib.umn.edu,2006:/janewang/programmersworld//3743.48981</id>
    
    <published>2006-07-17T14:22:03Z</published>
    <updated>2006-07-21T14:59:43Z</updated>
    
    <summary>FireFox and Netscape seams not working well with .NET ListBox web control. What should be a good alternative? Or what can I do to make the application looks good to these two browsers?...</summary>
    <author>
        <name>Jane Wang</name>
        <uri></uri>
    </author>
    
        <category term="Browser Problem" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.lib.umn.edu/janewang/programmersworld/">
        <![CDATA[<p>FireFox and Netscape seams not working well with .NET ListBox web control. What should be a good alternative? Or what can I do to make the application looks good to these two browsers?</p>]]>
        
    </content>
</entry>

<entry>
    <title>How to compare db field of &quot;text&quot; data type?</title>
    <link rel="alternate" type="text/html" href="http://blog.lib.umn.edu/janewang/programmersworld/2006/07/how_to_compare_db_field_of_tex.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blog.lib.umn.edu/cgi-bin/mt-atom.cgi/weblog/blog_id=3743/entry_id=48980" title="How to compare db field of &quot;text&quot; data type?" />
    <id>tag:blog.lib.umn.edu,2006:/janewang/programmersworld//3743.48980</id>
    
    <published>2006-07-17T14:16:32Z</published>
    <updated>2006-07-21T14:59:43Z</updated>
    
    <summary>Given a table with id which is auto number, category, description which is &quot;text&quot;. How could I know if the database already have an identical record before I try to insert a new one?...</summary>
    <author>
        <name>Jane Wang</name>
        <uri></uri>
    </author>
    
        <category term="DB Problem" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.lib.umn.edu/janewang/programmersworld/">
        <![CDATA[<p>Given a table with id which is auto number, category, description which is "<strong>text</strong>". How could I know if the database already have an identical record before I try to insert a new one?</p>]]>
        <![CDATA[<p>Error Message:</p>

<p>The text, ntext, and image data types are invalid for local variables.</p>

<p>Testing Code:</p>

<p>declare @desc text<br />
set @desc = 'description'</p>

<p>declare @cat_id int<br />
set @cat_id = 21</p>

<p>if exists (select pid from position where cat_id = @cat_id and description = @desc)<br />
	print 'yes'<br />
else<br />
	print 'no</p>]]>
    </content>
</entry>

</feed> 

