<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>This is how I do my business</title>
	
	<link>http://www.cosmocentral.com</link>
	<description />
	<lastBuildDate>Sun, 05 Jul 2009 17:59:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/CosmoCentral" type="application/rss+xml" /><feedburner:emailServiceId>CosmoCentral</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>payment_status value in Paypal Sandbox always pending</title>
		<link>http://feedproxy.google.com/~r/CosmoCentral/~3/g0CTB6T2Uek/</link>
		<comments>http://www.cosmocentral.com/2009/07/payment_status-value-in-paypal-sandbox-always-pending/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 17:59:49 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[paypal developer]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=539</guid>
		<description><![CDATA[I was working with the Paypal sandbox to test a Paypal application for a client. I was using IPN for the payment notification from PayPal so I could update member record on database. While testing I was getting the payment_status value Pending. ]]></description>
			<content:encoded><![CDATA[<p>I was working with the Paypal sandbox to test a Paypal application for a client. I was using IPN for the payment notification from PayPal so I could update member record on database. While testing I was getting the payment_status value Pending.  I played with the sandbox account after I created it, so things might have got messed up. After searching these steps below seem to have solved the problem getting me payment_status value Completed.</p>
<p><span>1. Login to your Developer Central.</span></p>
<p><span>2. Click on Test Accounts tab on the left.</span> You should have created these test accounts for testing on Sandbox.</p>
<p><span>3. Find the column &#8216;Payment Review&#8217;.</span></p>
<p><span>4. Find the sandbox account you are using  and click on &#8220;Enabled&#8221; in the &#8216;Payment Review&#8217; column.</span></p>
<p><span>5. This should change to &#8220;Disabled&#8221; and now payments funded from your balance and credit card will complete instantly.</span></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=g0CTB6T2Uek:JnQEzojzIGg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=g0CTB6T2Uek:JnQEzojzIGg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=g0CTB6T2Uek:JnQEzojzIGg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=g0CTB6T2Uek:JnQEzojzIGg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=g0CTB6T2Uek:JnQEzojzIGg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=g0CTB6T2Uek:JnQEzojzIGg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=g0CTB6T2Uek:JnQEzojzIGg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=g0CTB6T2Uek:JnQEzojzIGg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=g0CTB6T2Uek:JnQEzojzIGg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=g0CTB6T2Uek:JnQEzojzIGg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=g0CTB6T2Uek:JnQEzojzIGg:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=g0CTB6T2Uek:JnQEzojzIGg:KwTdNBX3Jqk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=g0CTB6T2Uek:JnQEzojzIGg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=g0CTB6T2Uek:JnQEzojzIGg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CosmoCentral/~4/g0CTB6T2Uek" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2009/07/payment_status-value-in-paypal-sandbox-always-pending/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.cosmocentral.com/2009/07/payment_status-value-in-paypal-sandbox-always-pending/</feedburner:origLink></item>
		<item>
		<title>Finding Controls in Repeater/DataList From The Event Handler</title>
		<link>http://feedproxy.google.com/~r/CosmoCentral/~3/WHCmd5mWnn8/</link>
		<comments>http://www.cosmocentral.com/2009/06/finding-controls-in-repeaterdatalist-from-the-event-handler/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 17:09:50 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=536</guid>
		<description><![CDATA[You may have Button, DropDownList etc controls in a Repeater/DataList that generates an Event. From those event handlers how do you find other controls inside the Repeater/DataList, in case you need the values from other controls.]]></description>
			<content:encoded><![CDATA[<p>You may have Button, DropDownList etc controls in a Repeater/DataList that generates an Event. From those event handlers how do you find other controls inside the Repeater/DataList, in case you need the values from other controls.</p>
<p>Here in this example below we have a button and a textbox inside a Repeater. The Button have an OnClick event. Inside that event handler we want to get the value from the TextBox.</p>
<p>&lt;asp:repeater id=&#8221;rpt&#8221;&#8230;&#8230;&gt;<br />
&lt;ItemTemplate&gt;<br />
&lt;asp:TextBox id=&#8221;txt&#8221; runat=&#8221;server&#8221; /&gt;<br />
&lt;asp:Button id=&#8221;btn&#8221; Text=&#8221;TEST&#8221; onclick=&#8221;btn_Click&#8221; runat=&#8221;server&#8221;/&gt;<br />
&lt;/ItemTemplate&gt;<br />
&lt;/asp:Repeater&gt;</p>
<p>protected void btn_Click(object sender, System.EventArgs e)<br />
{<br />
Button btn=(Button)sender;<br />
Repeater rpt=(Repeater)btn.Parent;<br />
//now you can use this rpt to find any control inside it<br />
//For example<br />
TextBox txt=(TextBox)rpt.FindControl(&#8221;txt&#8221;);<br />
string val=txt.Text;<br />
}</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WHCmd5mWnn8:tKYzDmZHGn8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WHCmd5mWnn8:tKYzDmZHGn8:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WHCmd5mWnn8:tKYzDmZHGn8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=WHCmd5mWnn8:tKYzDmZHGn8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WHCmd5mWnn8:tKYzDmZHGn8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=WHCmd5mWnn8:tKYzDmZHGn8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WHCmd5mWnn8:tKYzDmZHGn8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=WHCmd5mWnn8:tKYzDmZHGn8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WHCmd5mWnn8:tKYzDmZHGn8:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WHCmd5mWnn8:tKYzDmZHGn8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WHCmd5mWnn8:tKYzDmZHGn8:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=WHCmd5mWnn8:tKYzDmZHGn8:KwTdNBX3Jqk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WHCmd5mWnn8:tKYzDmZHGn8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=WHCmd5mWnn8:tKYzDmZHGn8:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CosmoCentral/~4/WHCmd5mWnn8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2009/06/finding-controls-in-repeaterdatalist-from-the-event-handler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.cosmocentral.com/2009/06/finding-controls-in-repeaterdatalist-from-the-event-handler/</feedburner:origLink></item>
		<item>
		<title>The text, ntext, and image data types are invalid in this subquery or aggregate expression</title>
		<link>http://feedproxy.google.com/~r/CosmoCentral/~3/f50hhozoxV8/</link>
		<comments>http://www.cosmocentral.com/2009/06/the-text-ntext-and-image-data-types-are-invalid-in-this-subquery-or-aggregate-expression-the-text-ntext-and-image-data-types-are-invalid-in-this-subquery-or-aggregate-expression/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 15:40:10 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=530</guid>
		<description><![CDATA[I have a client I was building an e-commerce website for. I was developing the website on MS SQL 2005 Database, but their deployment server have MS SQL 2000. From experience I knew there are some stuffs that would not work in MS SQL 2000, so I avoid them. This one missed my eyes. I get this error message on the search results page:

The text, ntext, and image data types are invalid in this subquery or aggregate expression.]]></description>
			<content:encoded><![CDATA[<p>I have a client I was building an e-commerce website for. I was developing the website on MS SQL 2005 Database, but their deployment server have MS SQL 2000. From experience I knew there are some stuffs that would not work in MS SQL 2000, so I avoid them. This one missed my eyes. I get this error message on the search results page:</p>
<p><span style="color: #ff0000;"><strong><span id="ctl00_ctl00_cphContent_cphMainContent_lblStatus" class="orange">The text, ntext, and image data types are invalid in this subquery or aggregate expression.</span></strong></span></p>
<p><span class="orange">After checking I found I was trying to get a TEXT column in a subquery, and that was causing the problem. An example query is:</span></p>
<p><span style="color: #0000ff;"><span class="orange">Select customerName,customerNote=(select top 1<strong> note</strong> from customerNotes Where customerId=C.customerId) from Customers C</span></span></p>
<p><span class="orange">Note that the column NOTE is a text column that was causing the problem.</span></p>
<p><strong><span class="orange">Solution:</span></strong></p>
<p><span class="orange">The text column need to be retrieved as a varchar column. Rewriting the query this way solves the problemma:</span></p>
<p><span style="color: #0000ff;"><span class="orange">Select customerName,customerNote=(select top 1<strong> Cast(note As varchar(500))</strong> from customerNotes Where customerId=C.customerId) from Customers C</span></span></p>
<p><span class="orange">You can also use Convert instead of Cast like this:</span></p>
<p><span style="color: #0000ff;"><span class="orange">Select customerName,customerNote=(select top 1<strong> Convert(</strong></span><span class="orange"><strong>varchar(500),</strong></span><span class="orange"><strong>note)</strong> from customerNotes Where customerId=C.customerId) from Customers C</span></span></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=f50hhozoxV8:uC-WQ3W0BME:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=f50hhozoxV8:uC-WQ3W0BME:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=f50hhozoxV8:uC-WQ3W0BME:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=f50hhozoxV8:uC-WQ3W0BME:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=f50hhozoxV8:uC-WQ3W0BME:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=f50hhozoxV8:uC-WQ3W0BME:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=f50hhozoxV8:uC-WQ3W0BME:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=f50hhozoxV8:uC-WQ3W0BME:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=f50hhozoxV8:uC-WQ3W0BME:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=f50hhozoxV8:uC-WQ3W0BME:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=f50hhozoxV8:uC-WQ3W0BME:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=f50hhozoxV8:uC-WQ3W0BME:KwTdNBX3Jqk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=f50hhozoxV8:uC-WQ3W0BME:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=f50hhozoxV8:uC-WQ3W0BME:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CosmoCentral/~4/f50hhozoxV8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2009/06/the-text-ntext-and-image-data-types-are-invalid-in-this-subquery-or-aggregate-expression-the-text-ntext-and-image-data-types-are-invalid-in-this-subquery-or-aggregate-expression/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.cosmocentral.com/2009/06/the-text-ntext-and-image-data-types-are-invalid-in-this-subquery-or-aggregate-expression-the-text-ntext-and-image-data-types-are-invalid-in-this-subquery-or-aggregate-expression/</feedburner:origLink></item>
		<item>
		<title>CASE Statement in Where Clause – Microsoft SQL</title>
		<link>http://feedproxy.google.com/~r/CosmoCentral/~3/lZNi4E6npsU/</link>
		<comments>http://www.cosmocentral.com/2009/06/case-statement-in-where-clause-microsoft-sql/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 15:37:55 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=525</guid>
		<description><![CDATA[Can we use CASE statement in a where clause? Answer is yes.]]></description>
			<content:encoded><![CDATA[<p>Can we use CASE statement in a where clause? Answer is yes.</p>
<p>The way it works is like this:</p>
<blockquote><p>SELECT * FROM myTable<br />
WHERE col1 = CASE WHEN col2 &lt; col3 THEN col2<br />
ELSE col3<br />
END</p></blockquote>
<p>Another example:</p>
<p>I wanna check if a column matches an ID variable, @itemId, in the where clause. If @itemId has a positive value we return the matching rows that have that itemId, otherwise we return all rows. How I do that?</p>
<blockquote><p>declare @itemId int;</p>
<p>select * from Items<br />
Where<br />
ItemId=CASE When @itemId&gt;0 THEN @itemId ELSE itemId END;</p></blockquote>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=lZNi4E6npsU:RztQ_eHLQTg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=lZNi4E6npsU:RztQ_eHLQTg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=lZNi4E6npsU:RztQ_eHLQTg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=lZNi4E6npsU:RztQ_eHLQTg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=lZNi4E6npsU:RztQ_eHLQTg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=lZNi4E6npsU:RztQ_eHLQTg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=lZNi4E6npsU:RztQ_eHLQTg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=lZNi4E6npsU:RztQ_eHLQTg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=lZNi4E6npsU:RztQ_eHLQTg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=lZNi4E6npsU:RztQ_eHLQTg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=lZNi4E6npsU:RztQ_eHLQTg:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=lZNi4E6npsU:RztQ_eHLQTg:KwTdNBX3Jqk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=lZNi4E6npsU:RztQ_eHLQTg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=lZNi4E6npsU:RztQ_eHLQTg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CosmoCentral/~4/lZNi4E6npsU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2009/06/case-statement-in-where-clause-microsoft-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.cosmocentral.com/2009/06/case-statement-in-where-clause-microsoft-sql/</feedburner:origLink></item>
		<item>
		<title>LinkButton CssClass Not Working – ASP .NET</title>
		<link>http://feedproxy.google.com/~r/CosmoCentral/~3/WNbnvFHzCXI/</link>
		<comments>http://www.cosmocentral.com/2009/06/linkbutton-cssclass-not-working-asp-net/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 17:13:02 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=521</guid>
		<description><![CDATA[I have two css classes like this:
.folderTextON,a.folderTextON:active,a.folderTextON:link,a.folderTextON:visited {color:#fff;font:bold 10px/12px Verdana,Arial;text-decoration: none;}
a.folderTextON:hover         { text-decoration: none; color: #FFFFFF; }
.folderTextOFF,a.folderTextOFF:active,a.folderTextOFF:link,a.folderTextOFF:visited {color:#AD9596;font:bold 10px/12px Verdana,Arial;text-decoration: none;}
a.folderTextOFF:hover         { text-decoration: none; color: #fff; }
I also have LinkButton like this:
&#60;asp:linkbutton id=&#8221;linkbtn&#8221; CssClass=&#8221;folderTextOFF&#8221; Runat=&#8221;server&#8221;&#62;A Link Button&#60;/asp:linkbutton&#62;
On code behind I tried to set the css class like this:
linkbtn.CssClass=&#8221;folderTextOn&#8220;;
This does not not work. On any browser [...]]]></description>
			<content:encoded><![CDATA[<p>I have two css classes like this:</p>
<p>.folderTextON,a.folderTextON:active,a.folderTextON:link,a.folderTextON:visited {color:#fff;font:bold 10px/12px Verdana,Arial;text-decoration: none;}<br />
a.folderTextON:hover         { text-decoration: none; color: #FFFFFF; }</p>
<p>.folderTextOFF,a.folderTextOFF:active,a.folderTextOFF:link,a.folderTextOFF:visited {color:#AD9596;font:bold 10px/12px Verdana,Arial;text-decoration: none;}<br />
a.folderTextOFF:hover         { text-decoration: none; color: #fff; }</p>
<p>I also have LinkButton like this:</p>
<p>&lt;asp:linkbutton id=&#8221;linkbtn&#8221; CssClass=&#8221;folderTextOFF&#8221; Runat=&#8221;server&#8221;&gt;A Link Button&lt;/asp:linkbutton&gt;</p>
<p>On code behind I tried to set the css class like this:</p>
<p><strong>linkbtn.CssClass=&#8221;folderText<span style="color: #ff0000;">On</span>&#8220;;</strong></p>
<p><strong>This does not not work. </strong>On any browser at all. The class code and all others are ok.Whats the problem?</p>
<p>Problem is the CssClass I assigned did not have ON all uppercase as I defined on the style. Modifying that this works:</p>
<p><strong>linkbtn.CssClass=&#8221;folderText<span style="color: #ff0000;">ON</span>&#8220;;</strong></p>
<p>Apparently on code behind class name need to be case sensitive. Whereas it does not matter on the asp page.<strong><br />
</strong></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WNbnvFHzCXI:_hnFTFtlTjE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WNbnvFHzCXI:_hnFTFtlTjE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WNbnvFHzCXI:_hnFTFtlTjE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=WNbnvFHzCXI:_hnFTFtlTjE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WNbnvFHzCXI:_hnFTFtlTjE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=WNbnvFHzCXI:_hnFTFtlTjE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WNbnvFHzCXI:_hnFTFtlTjE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=WNbnvFHzCXI:_hnFTFtlTjE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WNbnvFHzCXI:_hnFTFtlTjE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WNbnvFHzCXI:_hnFTFtlTjE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WNbnvFHzCXI:_hnFTFtlTjE:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=WNbnvFHzCXI:_hnFTFtlTjE:KwTdNBX3Jqk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=WNbnvFHzCXI:_hnFTFtlTjE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=WNbnvFHzCXI:_hnFTFtlTjE:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CosmoCentral/~4/WNbnvFHzCXI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2009/06/linkbutton-cssclass-not-working-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.cosmocentral.com/2009/06/linkbutton-cssclass-not-working-asp-net/</feedburner:origLink></item>
		<item>
		<title>IsInteger in ASP .NET</title>
		<link>http://feedproxy.google.com/~r/CosmoCentral/~3/FiHRMtFjL3Y/</link>
		<comments>http://www.cosmocentral.com/2009/05/isinteger-in-asp-net/#comments</comments>
		<pubDate>Tue, 19 May 2009 17:42:18 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[Programming / Coding]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=515</guid>
		<description><![CDATA[If you need to check if a number is an integer, there is no built in function for that in ASP .NET. But you can create a simple method for that like this.]]></description>
			<content:encoded><![CDATA[<p>If you need to check if a number is an integer, there is no built in function for that in ASP .NET. But you can create a simple method for that like this (code shown in C#).</p>
<blockquote><p>public static bool IsInteger(string inputValue)<br />
{<br />
if (!IsNumeric(inputValue))<br />
return false;<br />
try<br />
{<br />
int a = Convert.ToInt16(inputValue);    //Convert.ToInt16 will throw exception if string not integer<br />
return true;<br />
}<br />
catch<br />
{<br />
return false;<br />
}<br />
}</p>
<p>public static bool IsNumeric(string inputValue)<br />
{<br />
if (string.Equals(&#8221;", inputValue) || string.Equals(&#8221; &#8220;, inputValue))<br />
{<br />
return false;<br />
}<br />
else<br />
{<br />
/*<br />
The surrounding ^ and $ characters mean that the expression must appear at the beginning and the end of the string. In real terms, this means that the expression must match the whole string – the string cannot contain any other characters.<br />
*/<br />
string strRegex = @&#8221;(^((\+|-)\d)?\d*$)|(^((\+|-)\d)?\d*(\.\d+)?$)&#8221;;</p>
<p>Regex re = new Regex(strRegex);<br />
if (re.IsMatch(inputValue))<br />
return (true);<br />
else<br />
return (false);<br />
}<br />
}</p></blockquote>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=FiHRMtFjL3Y:CVPhtbzfpIc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=FiHRMtFjL3Y:CVPhtbzfpIc:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=FiHRMtFjL3Y:CVPhtbzfpIc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=FiHRMtFjL3Y:CVPhtbzfpIc:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=FiHRMtFjL3Y:CVPhtbzfpIc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=FiHRMtFjL3Y:CVPhtbzfpIc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=FiHRMtFjL3Y:CVPhtbzfpIc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=FiHRMtFjL3Y:CVPhtbzfpIc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=FiHRMtFjL3Y:CVPhtbzfpIc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=FiHRMtFjL3Y:CVPhtbzfpIc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=FiHRMtFjL3Y:CVPhtbzfpIc:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=FiHRMtFjL3Y:CVPhtbzfpIc:KwTdNBX3Jqk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=FiHRMtFjL3Y:CVPhtbzfpIc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=FiHRMtFjL3Y:CVPhtbzfpIc:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CosmoCentral/~4/FiHRMtFjL3Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2009/05/isinteger-in-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.cosmocentral.com/2009/05/isinteger-in-asp-net/</feedburner:origLink></item>
		<item>
		<title>Wordpress Update With Add-On Domain Causes Redirect to Main Url</title>
		<link>http://feedproxy.google.com/~r/CosmoCentral/~3/Pmd2S8SRhBY/</link>
		<comments>http://www.cosmocentral.com/2009/04/wordpress-update-with-add-on-domain-causes-redirect-to-main-url/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 05:22:23 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[Programming / Coding]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=504</guid>
		<description><![CDATA[I use one hosting to host most of my smaller sites. Mainly because its easier to manage. Recently I wanted to upgrade my portfolio blog Boston Web Developer to most recent wordpress blog version 2.7.1. After fixing the wp_config file as I upload the files to the server I find the site it redirecting to [...]]]></description>
			<content:encoded><![CDATA[<p>I use one hosting to host most of my smaller sites. Mainly because its easier to manage. Recently I wanted to upgrade my portfolio blog <a title="Boston Web Developer" href="http://www.BostonWebDeveloper.com" target="_blank">Boston Web Developer</a> to most recent wordpress blog version 2.7.1. After fixing the wp_config file as I upload the files to the server I find the site it redirecting to the main url with the blog folder name in front of it.</p>
<p>I set up a folder for the add-on domain inside the public_html folder. So if my main url were www.mysite.com and add-on folder were myBlog, the blog is to redirect to www.mysite.com/myblog. In correct case it were to be www.myBlogDomain.com for example.</p>
<p>Digging through the files I found, the .htaccess file inside the blog folder had no content in it, well it had two lines without anything between them:</p>
<blockquote><p># BEGIN WordPress<br />
# END WordPress</p></blockquote>
<p>Also there were a .htaccess file in the main root folder which was setting the url to the main domain name. And thats what was part of the problem as well.</p>
<p>To correct the redirect problem the .htaccess file for the blog folder should have:</p>
<blockquote><p># BEGIN WordPress<br />
&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . /index.php [L]<br />
&lt;/IfModule&gt;</p>
<p># END WordPress</p></blockquote>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=Pmd2S8SRhBY:ozcyoUl798M:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=Pmd2S8SRhBY:ozcyoUl798M:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=Pmd2S8SRhBY:ozcyoUl798M:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=Pmd2S8SRhBY:ozcyoUl798M:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=Pmd2S8SRhBY:ozcyoUl798M:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=Pmd2S8SRhBY:ozcyoUl798M:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=Pmd2S8SRhBY:ozcyoUl798M:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=Pmd2S8SRhBY:ozcyoUl798M:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=Pmd2S8SRhBY:ozcyoUl798M:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=Pmd2S8SRhBY:ozcyoUl798M:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=Pmd2S8SRhBY:ozcyoUl798M:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=Pmd2S8SRhBY:ozcyoUl798M:KwTdNBX3Jqk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=Pmd2S8SRhBY:ozcyoUl798M:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=Pmd2S8SRhBY:ozcyoUl798M:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CosmoCentral/~4/Pmd2S8SRhBY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2009/04/wordpress-update-with-add-on-domain-causes-redirect-to-main-url/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.cosmocentral.com/2009/04/wordpress-update-with-add-on-domain-causes-redirect-to-main-url/</feedburner:origLink></item>
		<item>
		<title>Google &amp; Twitter Drama: Winner is Twitter and Looser is FaceBook</title>
		<link>http://feedproxy.google.com/~r/CosmoCentral/~3/GtmLBOR2EIw/</link>
		<comments>http://www.cosmocentral.com/2009/04/google-twitter-drama-winner-is-twitter-and-looser-is-facebook/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 03:29:02 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[Advertising / Marketing]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=489</guid>
		<description><![CDATA[There are a lot of rumor around regarding Google and Twitter. Some tech news websites are reporting Google buying Twitter, some reporting Google and Twitter partnering together. Its all started when Google created an account at Twitter.No matter what its a win-win situation for  Twitter.
Twitter gets the most out of this:

 Free news coverage from [...]]]></description>
			<content:encoded><![CDATA[<div id="post_message_65640">There are a lot of rumor around regarding Google and Twitter. Some tech news websites are reporting Google buying Twitter, some reporting Google and Twitter partnering together. Its all started when Google created an account at Twitter.No matter what its a win-win situation for  Twitter.</p>
<p><strong>Twitter gets the most out of this:</strong></p>
<ul>
<li> Free news coverage from the rumor. This is a damn smart marketing trick. This &#8220;<strong>Rumor Game</strong>&#8221; worked pretty good getting Twitter a huge momentum.</li>
<li> Solid income for Twitter if they partner with Google. Even if Twitter eventually gets no deal with Google their income would increase several times more then what they earn now, just from the huge number of new users they would be getting.</li>
</ul>
<p>FaceBook had huge momentum last few years. People just loved it. Now with this <strong>Google Twitter Rumor Game</strong> Twitter can take away a big part of the spotlight. I would not even be surprised if Google and Twitter planned this whole thing against FaceBook.</p>
<p><strong>Marketing Lesson For Us:</strong></p>
<p>This is a very classic example how rumor can be utilized for marketing.</p></div>
<p><!-- / message --> <!-- sig --></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=GtmLBOR2EIw:kueO1d1e1bo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=GtmLBOR2EIw:kueO1d1e1bo:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=GtmLBOR2EIw:kueO1d1e1bo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=GtmLBOR2EIw:kueO1d1e1bo:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=GtmLBOR2EIw:kueO1d1e1bo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=GtmLBOR2EIw:kueO1d1e1bo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=GtmLBOR2EIw:kueO1d1e1bo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=GtmLBOR2EIw:kueO1d1e1bo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=GtmLBOR2EIw:kueO1d1e1bo:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=GtmLBOR2EIw:kueO1d1e1bo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=GtmLBOR2EIw:kueO1d1e1bo:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=GtmLBOR2EIw:kueO1d1e1bo:KwTdNBX3Jqk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=GtmLBOR2EIw:kueO1d1e1bo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=GtmLBOR2EIw:kueO1d1e1bo:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CosmoCentral/~4/GtmLBOR2EIw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2009/04/google-twitter-drama-winner-is-twitter-and-looser-is-facebook/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.cosmocentral.com/2009/04/google-twitter-drama-winner-is-twitter-and-looser-is-facebook/</feedburner:origLink></item>
		<item>
		<title>Happy April Fool’s Day</title>
		<link>http://feedproxy.google.com/~r/CosmoCentral/~3/0Mj6Mf_x9j0/</link>
		<comments>http://www.cosmocentral.com/2009/04/happy-april-fools-day/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 22:12:43 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[Advertising / Marketing]]></category>
		<category><![CDATA[My Business News]]></category>
		<category><![CDATA[webmaster forum]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=484</guid>
		<description><![CDATA[Not sure if I can call the April Fool's Day a Happy day, but I mean well.]]></description>
			<content:encoded><![CDATA[<p>Not sure if I can call the April Fool&#8217;s Day a Happy day, but I mean well.</p>
<p>Last night I put my <a href="http://www.webcosmoForums.com" target="_blank">webmaster forum</a> for sale on the buy/sell section at webcosmoforums.com and few others. Most of the readers at my forum immediately realized its a April Fools joke. People are indeed smart at my foum for sure.</p>
<p>At other forums only one person realized it was a joke. Then I got quite a few PMs asking for more information; some people offering a price as well. It was fun to see how much people think the forum might sell for. Highest price offer I got was $300.</p>
<p><strong>I think there were several lessons to learn from this for me:</strong></p>
<ul>
<li> It let me somewhat see how much my forum was worth to them. I wasn&#8217;t happy with the prices offered of course.</li>
<li>Showed me how much people would be interested in the forum. That actually signifies the marketing aspect of the forum, if it has a market value at all.</li>
<li>It shows me there are lot more work to be done to have a selling value that would make me happy. But for a 11 month old forum it wasn&#8217;t that bad, considering there are tons of forums being sold for less then $100.</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=0Mj6Mf_x9j0:vgD3aTHOZJs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=0Mj6Mf_x9j0:vgD3aTHOZJs:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=0Mj6Mf_x9j0:vgD3aTHOZJs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=0Mj6Mf_x9j0:vgD3aTHOZJs:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=0Mj6Mf_x9j0:vgD3aTHOZJs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=0Mj6Mf_x9j0:vgD3aTHOZJs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=0Mj6Mf_x9j0:vgD3aTHOZJs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=0Mj6Mf_x9j0:vgD3aTHOZJs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=0Mj6Mf_x9j0:vgD3aTHOZJs:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=0Mj6Mf_x9j0:vgD3aTHOZJs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=0Mj6Mf_x9j0:vgD3aTHOZJs:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=0Mj6Mf_x9j0:vgD3aTHOZJs:KwTdNBX3Jqk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=0Mj6Mf_x9j0:vgD3aTHOZJs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=0Mj6Mf_x9j0:vgD3aTHOZJs:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CosmoCentral/~4/0Mj6Mf_x9j0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2009/04/happy-april-fools-day/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.cosmocentral.com/2009/04/happy-april-fools-day/</feedburner:origLink></item>
		<item>
		<title>How to Select Random Row from Database</title>
		<link>http://feedproxy.google.com/~r/CosmoCentral/~3/xbYOyxS2I5k/</link>
		<comments>http://www.cosmocentral.com/2009/04/how-to-select-random-row-from-database/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 21:10:11 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[Programming / Coding]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=476</guid>
		<description><![CDATA[Few example codes shown below to select a Random Row from a table in different databases. The codes below shows how to select a single random row, you can change them to select multiple rows.]]></description>
			<content:encoded><![CDATA[<p>Few example codes shown below to select a <strong>Random Row</strong> from a table in different databases. The codes below shows how to select a single random row, you can change them to select multiple rows.</p>
<p><strong>Select a random row with Microsoft SQL Server:</strong></p>
<p>SELECT TOP 1 column FROM table<br />
ORDER BY NEWID()</p>
<p><strong>Select a </strong><strong>random row with MySQL:</strong></p>
<p>SELECT column FROM table<br />
ORDER BY RAND()<br />
LIMIT 1</p>
<p><strong>Select a random row with PostgreSQL:</strong></p>
<p>SELECT column FROM table<br />
ORDER BY RANDOM()<br />
LIMIT 1</p>
<p><strong>Select a random row with IBM DB2</strong></p>
<p>SELECT column, RAND() as IDX<br />
FROM table<br />
ORDER BY IDX FETCH FIRST 1 ROWS ONLY</p>
<p><strong>Select a random record with Oracle:</strong></p>
<p>SELECT column FROM<br />
( SELECT column FROM table<br />
ORDER BY dbms_random.value )<br />
WHERE rownum = 1</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=xbYOyxS2I5k:UQY3U9nnTa0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=xbYOyxS2I5k:UQY3U9nnTa0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=xbYOyxS2I5k:UQY3U9nnTa0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=xbYOyxS2I5k:UQY3U9nnTa0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=xbYOyxS2I5k:UQY3U9nnTa0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=xbYOyxS2I5k:UQY3U9nnTa0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=xbYOyxS2I5k:UQY3U9nnTa0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=xbYOyxS2I5k:UQY3U9nnTa0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=xbYOyxS2I5k:UQY3U9nnTa0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=xbYOyxS2I5k:UQY3U9nnTa0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=xbYOyxS2I5k:UQY3U9nnTa0:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=xbYOyxS2I5k:UQY3U9nnTa0:KwTdNBX3Jqk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CosmoCentral?a=xbYOyxS2I5k:UQY3U9nnTa0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CosmoCentral?i=xbYOyxS2I5k:UQY3U9nnTa0:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CosmoCentral/~4/xbYOyxS2I5k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2009/04/how-to-select-random-row-from-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.cosmocentral.com/2009/04/how-to-select-random-row-from-database/</feedburner:origLink></item>
	</channel>
</rss>
