<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>bencoffman.com/blog - JQuery</title>
    <link>http://bencoffman.com/blog/</link>
    <description>News about Tech and a few other things.</description>
    <language>en-us</language>
    <copyright>Ben Coffman</copyright>
    <lastBuildDate>Mon, 25 Oct 2010 04:22:51 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.1.8102.813</generator>
    <managingEditor>coffmanben@gmail.com</managingEditor>
    <webMaster>coffmanben@gmail.com</webMaster>
    <item>
      <trackback:ping>http://bencoffman.com/blog/Trackback.aspx?guid=1553905e-bd00-4273-a60a-ab048cab966b</trackback:ping>
      <pingback:server>http://bencoffman.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://bencoffman.com/blog/PermaLink,guid,1553905e-bd00-4273-a60a-ab048cab966b.aspx</pingback:target>
      <dc:creator>Ben Coffman</dc:creator>
      <wfw:comment>http://bencoffman.com/blog/CommentView,guid,1553905e-bd00-4273-a60a-ab048cab966b.aspx</wfw:comment>
      <wfw:commentRss>http://bencoffman.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=1553905e-bd00-4273-a60a-ab048cab966b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <img src="http://bencoffman.com/blog/content/binary/microsoft_.net_logo.png" width="120px" border="0" height="75px" />
        <br />
        <br />
        <b>Problem:</b>
        <br />
When I look for the id of an ASP.NET element with some sort of neat DOM querying language
I can't find it.<br /><br /><b>Solution:</b><br />
Remember ASP.NETer's ASP.NET renames the id from what you named it to something different
when it writes the element out to the page. The good news is ASP.NET always names
it to the same unique name (something like but not necessarily  <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="color: rgb(26, 26, 166); font-family: monospace; white-space: pre-wrap;">ctl00_classname_controlname)</span></span>.
Knowing this, you can run your page once and grab the id from the page source. Now
use your super cool DOM querying language of choice to find that id by it's new proper
ASP.NET name.<br /><br /><b>Explanation: </b><br />
Why does ASP.NET do this? The good super geeks at Microsoft know that most of us,
not you the reader of course, are not wise enough to give each ASP.NET element a unique
name so they won't conflict with each other when ASP.NET is doing all its little magic
tricks. 
<br /><br />
Once again this is a stupid little error that hung me up for more than I'd like to
admit. I knew ASP.NET did this I just didn't piece together on why I couldn't find
the element by id with my querying language. 
<br /><p></p><img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=1553905e-bd00-4273-a60a-ab048cab966b" /></body>
      <title>Finding the asp.net id with Dojo.byId, jquery("#id"), and Microsoft AJAX $get</title>
      <guid isPermaLink="false">http://bencoffman.com/blog/PermaLink,guid,1553905e-bd00-4273-a60a-ab048cab966b.aspx</guid>
      <link>http://bencoffman.com/blog/2010/10/25/FindingTheAspnetIdWithDojobyIdJqueryidAndMicrosoftAJAXGet.aspx</link>
      <pubDate>Mon, 25 Oct 2010 04:22:51 GMT</pubDate>
      <description>&lt;img src="http://bencoffman.com/blog/content/binary/microsoft_.net_logo.png" width="120px" border="0" height="75px"&gt;
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Problem:&lt;/b&gt;
&lt;br&gt;
When I look for the id of an ASP.NET element with some sort of neat DOM querying language
I can't find it.&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Solution:&lt;/b&gt;
&lt;br&gt;
Remember ASP.NETer's ASP.NET renames the id from what you named it to something different
when it writes the element out to the page. The good news is ASP.NET always names
it to the same unique name (something like but not necessarily&amp;nbsp; &lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(26, 26, 166); font-family: monospace; white-space: pre-wrap;"&gt;ctl00_classname_controlname)&lt;/span&gt;&lt;/span&gt;.
Knowing this, you can run your page once and grab the id from the page source. Now
use your super cool DOM querying language of choice to find that id by it's new proper
ASP.NET name.&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Explanation: &lt;/b&gt;
&lt;br&gt;
Why does ASP.NET do this? The good super geeks at Microsoft know that most of us,
not you the reader of course, are not wise enough to give each ASP.NET element a unique
name so they won't conflict with each other when ASP.NET is doing all its little magic
tricks. 
&lt;br&gt;
&lt;br&gt;
Once again this is a stupid little error that hung me up for more than I'd like to
admit. I knew ASP.NET did this I just didn't piece together on why I couldn't find
the element by id with my querying language. 
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://bencoffman.com/blog/aggbug.ashx?id=1553905e-bd00-4273-a60a-ab048cab966b" /&gt;</description>
      <comments>http://bencoffman.com/blog/CommentView,guid,1553905e-bd00-4273-a60a-ab048cab966b.aspx</comments>
      <category>.Net</category>
      <category>Dojo</category>
      <category>JQuery</category>
      <category>Microsoft AJAX</category>
    </item>
  </channel>
</rss>