<?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: Using values from hyperlink column in a query string</title><link>http://forums.asp.net/thread/300000.aspx</link><pubDate>Tue, 05 Aug 2003 06:23:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:300000</guid><dc:creator>adec</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/300000.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=300000</wfw:commentRss><description>Try this:
&lt;br /&gt;
&lt;pre&gt;
&lt;br /&gt;
&amp;lt;asp:datagrid id=&amp;quot;MessageBoardRepeater&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;lt;Columns&amp;gt; 
&lt;br /&gt;
&amp;lt;asp:TemplateColumn HeaderStyle-Width=&amp;quot;7%&amp;quot; HeaderText=&amp;quot;Case No&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;lt;ItemTemplate&amp;gt; 
&lt;br /&gt;
&amp;lt;asp:HyperLink text='&amp;lt;%# DataBinder.Eval(Container.DataItem, &amp;quot;title&amp;quot;) %&amp;gt;' NavigateUrl= '&amp;lt;%# &amp;quot;Thread.aspx?id=&amp;quot; &amp;amp; DataBinder.Eval(Container.DataItem, &amp;quot;threadId&amp;quot;) %&amp;gt;' Runat=&amp;quot;server&amp;quot; /&amp;gt; 
&lt;br /&gt;
&amp;lt;/ItemTemplate&amp;gt; 
&lt;br /&gt;
&amp;lt;/asp:TemplateColumn&amp;gt; 
&lt;br /&gt;
&amp;lt;/Columns&amp;gt; 
&lt;br /&gt;
&amp;lt;/asp:datagrid&amp;gt; 
&lt;br /&gt;
&lt;/pre&gt;</description></item><item><title>Re: Using values from hyperlink column in a query string</title><link>http://forums.asp.net/thread/299972.aspx</link><pubDate>Tue, 05 Aug 2003 04:42:21 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:299972</guid><dc:creator>catcyc</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/299972.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=299972</wfw:commentRss><description>dear adec,
&lt;br /&gt;
             i got the problem in using hyperlink in datagrid. Can you please teach me how to solve this problem, which i encounter the error-Input string was not in a correct format, when i click on the hyperlink.
&lt;br /&gt;
 
&lt;br /&gt;
            i enclosed herewith my code for your reference.
&lt;br /&gt;

&lt;br /&gt;
           &amp;lt;asp:datagrid id=&amp;quot;MessageBoardRepeater&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
&lt;br /&gt;
             &amp;lt;Columns&amp;gt;
&lt;br /&gt;
	&amp;lt;asp:TemplateColumn HeaderStyle-Width=&amp;quot;7%&amp;quot; HeaderText=&amp;quot;Case No&amp;quot;&amp;gt;
&lt;br /&gt;
	          &amp;lt;ItemTemplate&amp;gt;
&lt;br /&gt;
	         &amp;lt;asp:HyperLink text='&amp;lt;%# DataBinder.Eval(Container.DataItem, &amp;quot;title&amp;quot;) %&amp;gt;' NavigateUrl= 'Thread.aspx?id=&amp;lt;%# DataBinder.Eval(Container.DataItem, &amp;quot;threadId&amp;quot;) %&amp;gt;' Runat=&amp;quot;server&amp;quot; /&amp;gt;
&lt;br /&gt;
	        &amp;lt;/ItemTemplate&amp;gt;
&lt;br /&gt;
	&amp;lt;/asp:TemplateColumn&amp;gt;
&lt;br /&gt;
             &amp;lt;/Columns&amp;gt;
&lt;br /&gt;
          &amp;lt;/asp:datagrid&amp;gt;
&lt;br /&gt;

&lt;br /&gt;
              thank you very much indeed.
&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;
regards,
&lt;br /&gt;
Catcyc
&lt;br /&gt;
          
&lt;br /&gt;</description></item><item><title>Re: Using values from hyperlink column in a query string</title><link>http://forums.asp.net/thread/298983.aspx</link><pubDate>Mon, 04 Aug 2003 08:34:23 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:298983</guid><dc:creator>steo009</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/298983.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=298983</wfw:commentRss><description>Hey thanks guys. It works! :) 
&lt;br /&gt;

&lt;br /&gt;
most grateful</description></item><item><title>Re: Using values from hyperlink column in a query string</title><link>http://forums.asp.net/thread/298975.aspx</link><pubDate>Mon, 04 Aug 2003 08:26:45 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:298975</guid><dc:creator>adec</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/298975.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=298975</wfw:commentRss><description>Remember that the HyperlinkColumn can be found during the ItemDataBound Event. You are surely familiar with how to use this Event Handler, so I'll provide an example of code to use for the Item and Alternating ListItemTypes:
&lt;br /&gt;
&lt;pre&gt;
&lt;br /&gt;
    Private Sub dgrdProducts_ItemDataBound(ByVal sender As Object, ByVal e As DataGridItemEventArgs) Handles dgrdProducts.ItemDataBound
&lt;br /&gt;
        Dim item As ListItemType = e.Item.ItemType
&lt;br /&gt;

&lt;br /&gt;
        If item = ListItemType.Item Or item = ListItemType.AlternatingItem Then
&lt;br /&gt;
            Dim hl As HyperLink = e.Item.Cells(0).Controls(0)
&lt;br /&gt;

&lt;br /&gt;
            hl.NavigateUrl = &amp;quot;bogus.aspx?prodid=&amp;quot; &amp;amp; e.Item.DataItem(&amp;quot;ProductID&amp;quot;) &amp;amp; &amp;quot;&amp;amp;supplid=&amp;quot; &amp;amp; e.Item.DataItem(&amp;quot;SupplierID&amp;quot;)
&lt;br /&gt;

&lt;br /&gt;
        End If
&lt;br /&gt;

&lt;br /&gt;
    End Sub
&lt;br /&gt;
&lt;/pre&gt;
&lt;br /&gt;
The HL-Column is made up of Hyperlinks, so you'll need to find them. In my example, The first Control of the first Cell is a Hyperlink, as my Hyperlink Column is my First Column. You may now add as many arguments as you like to your hyperlink.</description></item><item><title>Re: Using values from hyperlink column in a query string</title><link>http://forums.asp.net/thread/298956.aspx</link><pubDate>Mon, 04 Aug 2003 07:34:48 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:298956</guid><dc:creator>steo009</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/298956.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=298956</wfw:commentRss><description>Hmmm.  But that only allows you to pass one parameter right? I tried to use multiple parameters but that doesn't work. Someone mentioned the use of an asp template column. That should be ok, but how do you pass another value in the same row in the same query string? The above example throws an index error if i tried {1}.</description></item><item><title>Re: Using values from hyperlink column in a query string</title><link>http://forums.asp.net/thread/298395.aspx</link><pubDate>Sun, 03 Aug 2003 02:32:13 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:298395</guid><dc:creator>SushilaSB</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/298395.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=298395</wfw:commentRss><description>In case you are using HyperlinkColumn as
&lt;br /&gt;
&lt;pre&gt;
&lt;br /&gt;
&amp;lt;asp:DataGrid id=&amp;quot;DataGrid1&amp;quot; AutoGenerateColumns=&amp;quot;False&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
&lt;br /&gt;
&amp;lt;Columns&amp;gt;
&lt;br /&gt;
	&amp;lt;asp:HyperLinkColumn HeaderText=&amp;quot;ID&amp;quot; DataNavigateUrlField=&amp;quot;ID&amp;quot; 
&lt;br /&gt;
	DataNavigateUrlFormatString=&amp;quot;link.aspx?id={0}&amp;quot; 
&lt;br /&gt;
	DataTextField=&amp;quot;ID&amp;quot;&amp;gt;&amp;lt;/asp:HyperLinkColumn&amp;gt;
&lt;br /&gt;
&amp;lt;/Columns&amp;gt;
&lt;br /&gt;
&amp;lt;/asp:DataGrid&amp;gt;
&lt;br /&gt;

&lt;br /&gt;
&lt;/pre&gt;
&lt;br /&gt;

&lt;br /&gt;
You can write
&lt;br /&gt;
Response.Write(Request.queryString(&amp;quot;id&amp;quot;))
&lt;br /&gt;

&lt;br /&gt;
Is this the way you are trying it
&lt;br /&gt;
or are you having Hyperlink as &amp;lt;asp:hyperlink  runat=server....  &amp;gt;</description></item><item><title>Using values from hyperlink column in a query string</title><link>http://forums.asp.net/thread/298362.aspx</link><pubDate>Sat, 02 Aug 2003 23:55:42 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:298362</guid><dc:creator>steo009</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/298362.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=298362</wfw:commentRss><description>Hi All!
&lt;br /&gt;

&lt;br /&gt;
I just made a column in my datagrid a hyperlink column but I can't seem to use those values in the column in a query string anymore. Before I just used e.items[1].text to get it but thats not working anymore since I guess its now a hyperlink not plain text. How can I get the actual text of the hyperlink? Any help would be great!
&lt;br /&gt;

&lt;br /&gt;
Thanks :)</description></item></channel></rss>