<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Data Presentation Controls</title><link>http://forums.asp.net/24.aspx</link><description>ASP.NET data-bound controls such as the DataGrid, DataList, GridView, FormView, DetailsView, and Repeater Controls.  &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=23&amp;c=17" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: HyperLinkField's in GridView can't have javascript calls in the DataNavigateUrlFormatString property</title><link>http://forums.asp.net/thread/1780990.aspx</link><pubDate>Sat, 30 Jun 2007 17:42:30 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1780990</guid><dc:creator>Rivelyn</dc:creator><author>Rivelyn</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1780990.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1780990</wfw:commentRss><description>&lt;p&gt;The fix to my problem was solved somewhat based on this thread.&lt;/p&gt;
&lt;p&gt;Fist I replace my Gridview with a Repeater, I just created the same look as the gridview using a table then dropped the table into the Repeater template.&lt;/p&gt;
&lt;p&gt;It looks like so,&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#800000" size="2"&gt;Repeater&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;ItemData&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;server&amp;quot;&amp;gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;ItemTemplate&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;table&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;border&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;0&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;cellpadding&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;0&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;cellspacing&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;0&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;style&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;width: 95%; position: relative;&amp;quot;&amp;gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;tr&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;td&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;align&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;left&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;style&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;border-bottom: dimgray 1px dotted&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;valign&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;middle&amp;quot;&amp;gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#800000" size="2"&gt;LinkButton&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;ItemLink&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;server&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;OnClientClick&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;#39;&lt;/font&gt;&lt;font size="2"&gt;&amp;lt;%# Eval(&amp;quot;ItemID&amp;quot;) %&amp;gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;#39;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;Style&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;position: relative&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;Text&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;#39;&lt;/font&gt;&lt;font size="2"&gt;&amp;lt;%# Eval(&amp;quot;ItemName&amp;quot;) %&amp;gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;#39;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#800000" size="2"&gt;LinkButton&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;td&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;tr&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;table&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;ItemTemplate&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#800000" size="2"&gt;Repeater&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;And the code beside looks like this,&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Protected&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/font&gt;&lt;font size="2"&gt; ItemData_ItemDataBound(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; sender &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Object&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; e &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; System.Web.UI.WebControls.RepeaterItemEventArgs) &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Handles&lt;/font&gt;&lt;font size="2"&gt; ItemData.ItemDataBound&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; hl &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; LinkButton = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;DirectCast&lt;/font&gt;&lt;font size="2"&gt;(e.Item.FindControl(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;ItemLink&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;), LinkButton)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;hl.OnClientClick = &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;javascript:window.open(&amp;#39;../ItemDetail/Default.aspx?ItemID=&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &amp;amp; hl.OnClientClick &amp;amp; &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;&amp;#39;, &amp;#39;MyWindow&amp;#39;, &amp;#39;toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,location=0,left = 390,top = 362,width=500,height=300&amp;#39;);&amp;quot;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;When the link button is clicked it runs the window.open command and inserts the ItemID&lt;/p&gt;
&lt;p&gt;Thanks Everyone&lt;/p&gt;</description></item><item><title>Re: HyperLinkField's in GridView can't have javascript calls in the DataNavigateUrlFormatString property</title><link>http://forums.asp.net/thread/1779971.aspx</link><pubDate>Fri, 29 Jun 2007 16:33:12 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1779971</guid><dc:creator>ToddDev</dc:creator><author>ToddDev</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1779971.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1779971</wfw:commentRss><description>&lt;p&gt;Thanks, I cheated a little by using the replace() in the rowdatabound event. I will try your method though. Thanks&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: HyperLinkField's in GridView can't have javascript calls in the DataNavigateUrlFormatString property</title><link>http://forums.asp.net/thread/1779946.aspx</link><pubDate>Fri, 29 Jun 2007 16:22:28 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1779946</guid><dc:creator>JHoxley</dc:creator><author>JHoxley</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1779946.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1779946</wfw:commentRss><description>&lt;p&gt;I use: &amp;nbsp;&lt;pre class="coloredcode"&gt;Eval(&lt;span class="st"&gt;&amp;quot;Engineer&amp;quot;&lt;/span&gt;,&lt;span class="st"&gt;&amp;quot;\&amp;quot;&lt;/span&gt;{0}\&lt;span class="st"&gt;&amp;quot;&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;To send the engineer&amp;#39;s textual/string name to the JS function. The key is to add quotation marks around the value...&lt;/p&gt;
&lt;p&gt;hth&lt;br /&gt;Jack&lt;/p&gt;</description></item><item><title>Re: HyperLinkField's in GridView can't have javascript calls in the DataNavigateUrlFormatString property</title><link>http://forums.asp.net/thread/1779897.aspx</link><pubDate>Fri, 29 Jun 2007 16:06:12 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1779897</guid><dc:creator>ToddDev</dc:creator><author>ToddDev</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1779897.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1779897</wfw:commentRss><description>&lt;p&gt;Thanks everyone, &lt;/p&gt;&lt;p&gt;I been frustrated for days trying to figure this Javascript/hyperlink/pop-up window. Thanks to you I am closer to my resolution. &lt;/p&gt;&lt;p&gt;One question, how do I pass a string value as a second parameter to the Javascript function. Thanks&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: HyperLinkField's in GridView can't have javascript calls in the DataNavigateUrlFormatString property</title><link>http://forums.asp.net/thread/1775266.aspx</link><pubDate>Wed, 27 Jun 2007 13:55:09 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1775266</guid><dc:creator>JHoxley</dc:creator><author>JHoxley</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1775266.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1775266</wfw:commentRss><description>&lt;p&gt;Thanks for that link - I thought I&amp;#39;d run a good enough search of this forum but that thread was just what I needed &lt;img src="http://forums.asp.net/emoticons/emotion-1.gif" alt="Smile" /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve now solved my problem:&lt;/p&gt;&lt;pre class="coloredcode"&gt;&amp;lt;&lt;span class="tag"&gt;asp:HyperLinkField&lt;/span&gt;&lt;span class="attr"&gt; DataNavigateUrlFields=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Longitude,Latitude&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; DataNavigateUrlFormatString=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;javascript:ShowMapLocation({0},{1})&amp;quot;&lt;/span&gt;
&lt;span class="attr"&gt;     DataTextField=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Tracking&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; DataTextFormatString=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;{0}&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; HeaderText=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Tracking&amp;quot;&lt;/span&gt;
&lt;span class="attr"&gt;     ShowHeader=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;False&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; Target=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;_blank&amp;quot;&lt;/span&gt;&amp;gt;
     &amp;lt;&lt;span class="tag"&gt;ItemStyle&lt;/span&gt;&lt;span class="attr"&gt; HorizontalAlign=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Center&amp;quot;&lt;/span&gt; /&amp;gt;
&amp;lt;/&lt;span class="tag"&gt;asp:HyperLinkField&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;Now becomes:&lt;/p&gt;&lt;pre class="coloredcode"&gt;&amp;lt;&lt;span class="tag"&gt;asp:TemplateField&lt;/span&gt;&lt;span class="attr"&gt; ItemStyle-HorizontalAlign=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Center&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; HeaderText=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Tracking&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; SortExpression=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Tracking&amp;quot;&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span class="tag"&gt;ItemTemplate&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span class="tag"&gt;asp:HyperLink&lt;/span&gt;&lt;span class="attr"&gt; ID=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;idTracking&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; runat=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt;  NavigateUrl=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;#39;&lt;span class="dir"&gt;&amp;lt;%#&lt;/span&gt; &amp;quot;ShowMapLocation(&amp;quot; + Eval(&amp;quot;Longitude&amp;quot;, &amp;quot;{0}&amp;quot;) + &amp;quot;,&amp;quot; + Eval(&amp;quot;Latitude&amp;quot;,&amp;quot;{0}&amp;quot;) + &amp;quot;)&amp;quot; &lt;span class="dir"&gt;%&amp;gt;&lt;/span&gt;&amp;#39;&lt;/span&gt;&lt;span class="attr"&gt; Text=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;#39;&lt;span class="dir"&gt;&amp;lt;%#&lt;/span&gt; Eval(&amp;quot;Tracking&amp;quot;) &lt;span class="dir"&gt;%&amp;gt;&lt;/span&gt;&amp;#39;&lt;/span&gt;/&amp;gt;                                            
    &amp;lt;/&lt;span class="tag"&gt;ItemTemplate&lt;/span&gt;&amp;gt;
&amp;lt;/&lt;span class="tag"&gt;asp:TemplateField&lt;/span&gt;&amp;gt; &lt;/pre&gt;
&lt;p&gt;With a supporting piece of CS:&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;span class="kwd"&gt;protected void&lt;/span&gt; GridView1_RowDataBound(&lt;span class="kwd"&gt;object&lt;/span&gt; sender, GridViewRowEventArgs e)
{
    &lt;span class="kwd"&gt;if&lt;/span&gt; (e.Row.RowType == DataControlRowType.DataRow)
    {
        HyperLink hl = (HyperLink)e.Row.FindControl(&lt;span class="st"&gt;&amp;quot;idTracking&amp;quot;&lt;/span&gt;);

        hl.NavigateUrl = &lt;span class="st"&gt;&amp;quot;javascript:&amp;quot;&lt;/span&gt; + hl.NavigateUrl;
    }

}&lt;/pre&gt;&lt;pre class="coloredcode"&gt;I&amp;#39;m sure there is a better way of solving this, but I&amp;#39;m only doing web development because I have to - it&amp;#39;s not my normal area &lt;img src="http://forums.asp.net/emoticons/emotion-5.gif" alt="Wink" /&gt;&lt;/pre&gt;&lt;pre class="coloredcode"&gt;So far as I&amp;#39;ve been able to test it appears work just fine!&lt;/pre&gt;&lt;pre class="coloredcode"&gt;Best of luck solving your problem!&lt;br /&gt;Jack&lt;/pre&gt;</description></item><item><title>Re: HyperLinkField's in GridView can't have javascript calls in the DataNavigateUrlFormatString property</title><link>http://forums.asp.net/thread/1775105.aspx</link><pubDate>Wed, 27 Jun 2007 12:52:25 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1775105</guid><dc:creator>Rivelyn</dc:creator><author>Rivelyn</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1775105.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1775105</wfw:commentRss><description>&lt;p&gt;You and I are working on the same thing.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://forums.asp.net/p/1126413/1773081.aspx#1773081"&gt;http://forums.asp.net/p/1126413/1773081.aspx#1773081&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;With a small difference, I am trying to pass an ItemID into a java code string from a gridview to display the item detials in a java popup window. &lt;/p&gt;
&lt;p&gt;If I get a solution for my problem I will most definately share since it will also correct you problem.&lt;/p&gt;</description></item><item><title>HyperLinkField's in GridView can't have javascript calls in the DataNavigateUrlFormatString property</title><link>http://forums.asp.net/thread/1774967.aspx</link><pubDate>Wed, 27 Jun 2007 11:32:42 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1774967</guid><dc:creator>JHoxley</dc:creator><author>JHoxley</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1774967.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1774967</wfw:commentRss><description>&lt;p&gt;Hello all,&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In a nutshell:&lt;/strong&gt; If I put &amp;quot;javascript:ShowMapLocation({0},{1};&amp;quot; in the DataNavigateUrlFormatString it silently fails and generates *no* clickable link. If I remove the &amp;quot;:&amp;quot; from the string then it generates a clickable link but is, obviously, unusable. How can I get the ASP.NET&amp;#39;s GridView control to generate a link pointing to a javascript function?&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve successfully got a SQL Server 2005 query filling an ASP.NET GridView control working how I want. Part of the data returned is a longitude/latitude coordinate that we were&amp;nbsp;compositing into a DataNavigateUrlFormatString field in a HyperLinkField to just point to a commercial mapping website. It was just a simple placeholder, but the code did the trick - the GPS coordinates were inserted into the URL which was usable in the final webpage.&lt;/p&gt;
&lt;p&gt;I now want to integrate Virtual Earth and actually embed the map directly into the page. I have a proof-of-concept that has regular HTML hyperlinks calling a javascript function that binds the map to a &amp;lt;div&amp;gt; tag. Works just fine.&lt;/p&gt;
&lt;p&gt;My problem is putting the two together. I simply cannot find anyway of getting the GridView control&amp;#39;s HyperLinkField column type to generate a valid javascript link. I&amp;#39;ve tried catching events and writing code to force it in, I&amp;#39;ve tried escape sequences to trick it...&lt;/p&gt;
&lt;p&gt;From searching the internet it seems I&amp;#39;m not the only person to have this problem, but none of the pages I&amp;#39;ve seen offer a proper solution and some even suggest it&amp;#39;s a bug in how ASP.NET parses/generates the strings.&lt;/p&gt;
&lt;p&gt;Would someone be so kind as to confirm whether this usage is actually possible (if it is a bug and/or impossible I&amp;#39;ll stop trying!) and if so, how I might go about it?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jack&lt;/p&gt;</description></item></channel></rss>