<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How-to use ClientIDs in JavaScript without the ugliness</title>
	<atom:link href="http://jagregory.com/writings/how-to-use-clientids-in-javascript-without-the-ugliness/feed/" rel="self" type="application/rss+xml" />
	<link>http://jagregory.com/writings/how-to-use-clientids-in-javascript-without-the-ugliness/</link>
	<description>Monkeying with the code</description>
	<lastBuildDate>Thu, 04 Aug 2011 15:17:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Rusty</title>
		<link>http://jagregory.com/writings/how-to-use-clientids-in-javascript-without-the-ugliness/comment-page-1/#comment-52720</link>
		<dc:creator>Rusty</dc:creator>
		<pubDate>Thu, 22 Jul 2010 05:08:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=16#comment-52720</guid>
		<description>Excellent Work!  I&#039;m going to use your code along side some Telerik Controls which don&#039;t support finding the ClientID for controls that are within a user control and a RadAjaxPanel.  Anyone else using Telerik then this is your solution when $find(&quot;&quot;) returns null.  Hope this helps others, it has really helped me!   Simple and elegant...way to go!</description>
		<content:encoded><![CDATA[<p>Excellent Work!  I&#8217;m going to use your code along side some Telerik Controls which don&#8217;t support finding the ClientID for controls that are within a user control and a RadAjaxPanel.  Anyone else using Telerik then this is your solution when $find(&#8220;&#8221;) returns null.  Hope this helps others, it has really helped me!   Simple and elegant&#8230;way to go!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://jagregory.com/writings/how-to-use-clientids-in-javascript-without-the-ugliness/comment-page-1/#comment-52545</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Tue, 29 Jun 2010 13:30:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=16#comment-52545</guid>
		<description>Nice work dude! This is a pretty great idea. In fact, it&#039;s so good that it&#039;s one of those ideas that makes you think, &#039;Wow, Microsoft really should have included this to start with&#039;.

This is just another example of fancy tools making things easier while at the same time taking away power and flexibility. It&#039;s great that ASP.NET can generate all kinds of fancy markup based on serverside code, but if it&#039;s going to mangle the ids to keep conflicts away, it really should have included a map - like yours - so that we can still operate clientside. Otherwise, all that markup doesn&#039;t do us much good, does it?

Keep up the good work!</description>
		<content:encoded><![CDATA[<p>Nice work dude! This is a pretty great idea. In fact, it&#8217;s so good that it&#8217;s one of those ideas that makes you think, &#8216;Wow, Microsoft really should have included this to start with&#8217;.</p>
<p>This is just another example of fancy tools making things easier while at the same time taking away power and flexibility. It&#8217;s great that ASP.NET can generate all kinds of fancy markup based on serverside code, but if it&#8217;s going to mangle the ids to keep conflicts away, it really should have included a map &#8211; like yours &#8211; so that we can still operate clientside. Otherwise, all that markup doesn&#8217;t do us much good, does it?</p>
<p>Keep up the good work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary Noter</title>
		<link>http://jagregory.com/writings/how-to-use-clientids-in-javascript-without-the-ugliness/comment-page-1/#comment-17003</link>
		<dc:creator>Gary Noter</dc:creator>
		<pubDate>Mon, 16 Mar 2009 15:24:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=16#comment-17003</guid>
		<description>James, et. al., 

I thought that asp.net control IDs would be available in JavaScript (JS) in VS 2008, though they don&#039;t seem to be (either that or I haven&#039;t clued in to how this is achieved in VS08 without 3rd party help). 

Then I found this tool.  Works great!  I caution its use, perhaps to internal web apps, as it exposes too much of the code-behind in the ClientIDs array; e.g. actual asp.net control ID names.

Also, ClientIDs array has *every* control in it, whether I use it in JS or not; I prefer only those controls which I want exposed in JS.  I could hardcode something, use generally global IDs, or put an identifier in the .NET ID, such as &quot;JAG&quot; at the end of the controlID [a form of recognition for James&#039; solution, per se].

I first opted for putting JAG at the end of the .NET ID. I then modified  ServerControlIDs.GetMappedIDs to only process those controls wherein the .NET ID ends with &quot;_JAG&quot;.

This may work for the most part for most programmers; however, I was adding/removing this tag more than I wanted, so I implemented a more generic tag in the .NET ID that I already use. 

For years I&#039;ve append a prefix to my .NET IDs, such as &#039;txt&#039; for Textbox, &#039;btn&#039; for Button, &#039;chbx&#039; for checkbox, &#039;ddl&#039; for DropDownList.  You may see where I&#039;m going with this.  Rather than suffixing &quot;_JAG&quot; (sorry, James!!), I merely changed ServerControlIDs.GetMappedIDs to look for my already used prefixes at the beginning of the .NET ID.  That way, I don&#039;t have to add/remove &quot;_JAG&quot; (again, sorry James!) to the .NET ID.

So, James, your code has made my life easier, yet more complex! I&#039;m now doing double validation coding!   client-side now (via leveraging your solution) and server-side (which, in reading other blogs, it seems to be a &#039;best practice&#039; to be doing double-validation anyway . . . )

Thanks, James.

Cheers!

GaryN</description>
		<content:encoded><![CDATA[<p>James, et. al., </p>
<p>I thought that asp.net control IDs would be available in JavaScript (JS) in VS 2008, though they don&#8217;t seem to be (either that or I haven&#8217;t clued in to how this is achieved in VS08 without 3rd party help). </p>
<p>Then I found this tool.  Works great!  I caution its use, perhaps to internal web apps, as it exposes too much of the code-behind in the ClientIDs array; e.g. actual asp.net control ID names.</p>
<p>Also, ClientIDs array has *every* control in it, whether I use it in JS or not; I prefer only those controls which I want exposed in JS.  I could hardcode something, use generally global IDs, or put an identifier in the .NET ID, such as &#8220;JAG&#8221; at the end of the controlID [a form of recognition for James' solution, per se].</p>
<p>I first opted for putting JAG at the end of the .NET ID. I then modified  ServerControlIDs.GetMappedIDs to only process those controls wherein the .NET ID ends with &#8220;_JAG&#8221;.</p>
<p>This may work for the most part for most programmers; however, I was adding/removing this tag more than I wanted, so I implemented a more generic tag in the .NET ID that I already use. </p>
<p>For years I&#8217;ve append a prefix to my .NET IDs, such as &#8216;txt&#8217; for Textbox, &#8216;btn&#8217; for Button, &#8216;chbx&#8217; for checkbox, &#8216;ddl&#8217; for DropDownList.  You may see where I&#8217;m going with this.  Rather than suffixing &#8220;_JAG&#8221; (sorry, James!!), I merely changed ServerControlIDs.GetMappedIDs to look for my already used prefixes at the beginning of the .NET ID.  That way, I don&#8217;t have to add/remove &#8220;_JAG&#8221; (again, sorry James!) to the .NET ID.</p>
<p>So, James, your code has made my life easier, yet more complex! I&#8217;m now doing double validation coding!   client-side now (via leveraging your solution) and server-side (which, in reading other blogs, it seems to be a &#8216;best practice&#8217; to be doing double-validation anyway . . . )</p>
<p>Thanks, James.</p>
<p>Cheers!</p>
<p>GaryN</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dev 4 Web &#187; Best way to put control ClientId inside JavaScript</title>
		<link>http://jagregory.com/writings/how-to-use-clientids-in-javascript-without-the-ugliness/comment-page-1/#comment-13314</link>
		<dc:creator>Dev 4 Web &#187; Best way to put control ClientId inside JavaScript</dc:creator>
		<pubDate>Wed, 05 Nov 2008 12:49:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=16#comment-13314</guid>
		<description>[...] http://blog.jagregory.com/2006/04/12/how-to-use-clientids-in-javascript-without-the-ugliness/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://blog.jagregory.com/2006/04/12/how-to-use-clientids-in-javascript-without-the-ugliness/" rel="nofollow">http://blog.jagregory.com/2006/04/12/how-to-use-clientids-in-javascript-without-the-ugliness/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KlimUser</title>
		<link>http://jagregory.com/writings/how-to-use-clientids-in-javascript-without-the-ugliness/comment-page-1/#comment-9282</link>
		<dc:creator>KlimUser</dc:creator>
		<pubDate>Tue, 12 Aug 2008 21:18:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=16#comment-9282</guid>
		<description>Hello James!!
I left a comment a few days ago but i don&#039;t see them =S
Last time i visited your Blog, they say that they were waiting for moderation.
Well I get back ina  afew days =)
Greetings!!!</description>
		<content:encoded><![CDATA[<p>Hello James!!<br />
I left a comment a few days ago but i don&#8217;t see them =S<br />
Last time i visited your Blog, they say that they were waiting for moderation.<br />
Well I get back ina  afew days =)<br />
Greetings!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Gregory</title>
		<link>http://jagregory.com/writings/how-to-use-clientids-in-javascript-without-the-ugliness/comment-page-1/#comment-7467</link>
		<dc:creator>James Gregory</dc:creator>
		<pubDate>Fri, 20 Jun 2008 07:40:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=16#comment-7467</guid>
		<description>Ian, Rick: I&#039;ve fixed the download link.

Naz: Glad you found it of some use!</description>
		<content:encoded><![CDATA[<p>Ian, Rick: I&#8217;ve fixed the download link.</p>
<p>Naz: Glad you found it of some use!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Naz</title>
		<link>http://jagregory.com/writings/how-to-use-clientids-in-javascript-without-the-ugliness/comment-page-1/#comment-7458</link>
		<dc:creator>Naz</dc:creator>
		<pubDate>Thu, 19 Jun 2008 20:55:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=16#comment-7458</guid>
		<description>Thanks James, very helpful!  Exactly what I was looking for.  I&#039;m using your scripted variable concept to pass a server control&#039;s client id through a button&#039;s OnClientClick event to a javascript in .Net 2 and it works like a charm.  All other methods that I had tired thus far had failed in my given context for one reason or another.</description>
		<content:encoded><![CDATA[<p>Thanks James, very helpful!  Exactly what I was looking for.  I&#8217;m using your scripted variable concept to pass a server control&#8217;s client id through a button&#8217;s OnClientClick event to a javascript in .Net 2 and it works like a charm.  All other methods that I had tired thus far had failed in my given context for one reason or another.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick</title>
		<link>http://jagregory.com/writings/how-to-use-clientids-in-javascript-without-the-ugliness/comment-page-1/#comment-7457</link>
		<dc:creator>Rick</dc:creator>
		<pubDate>Thu, 19 Jun 2008 18:43:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=16#comment-7457</guid>
		<description>Greetings. I planned to download your project and save myself a bunch of time - but it&#039;s no longer available. Is there an alternative download location?  Thanks!</description>
		<content:encoded><![CDATA[<p>Greetings. I planned to download your project and save myself a bunch of time &#8211; but it&#8217;s no longer available. Is there an alternative download location?  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tan</title>
		<link>http://jagregory.com/writings/how-to-use-clientids-in-javascript-without-the-ugliness/comment-page-1/#comment-7444</link>
		<dc:creator>Tan</dc:creator>
		<pubDate>Wed, 18 Jun 2008 13:21:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=16#comment-7444</guid>
		<description>Hi,
It seems your link to download the zip file is not working, 
Could you please fix the link to download the file</description>
		<content:encoded><![CDATA[<p>Hi,<br />
It seems your link to download the zip file is not working,<br />
Could you please fix the link to download the file</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Gregory</title>
		<link>http://jagregory.com/writings/how-to-use-clientids-in-javascript-without-the-ugliness/comment-page-1/#comment-837</link>
		<dc:creator>James Gregory</dc:creator>
		<pubDate>Wed, 29 Aug 2007 09:20:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=16#comment-837</guid>
		<description>You are correct, this was written before I&#039;d started using .Net 2 my self. I should really update it, but in the meantime the source code is available.</description>
		<content:encoded><![CDATA[<p>You are correct, this was written before I&#8217;d started using .Net 2 my self. I should really update it, but in the meantime the source code is available.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
