Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Hyper Link in DataGrid

Reply
Thread Tools

Hyper Link in DataGrid

 
 
aroraamit81@gmail.com
Guest
Posts: n/a
 
      03-03-2006
<ItemTemplate>
<asp:HyperLink CssClass="LinkShort" Runat="server"
NavigateUrl="TeamUsers.aspx?TeamID=<%#((System.Dat a.DataRowView)Container.DataItem)["Team_Name"]
%>">
<%#((System.Data.DataRowView)Container.DataItem)["Team_Name"]
%>

</asp:HyperLink>

</ItemTemplate>

What is wrong with the above statements. I gives me a parser error like
"The server tag is not well formed."

Any Help?????

Regards,

Amit Arora

 
Reply With Quote
 
 
 
 
Ken Cox - Microsoft MVP
Guest
Posts: n/a
 
      03-03-2006
You need to use single quotes on the outer attribute value because you have
double quotes in the server-side code. Try this?

<asp:templatecolumn>
<itemtemplate>
<asp:hyperlink
id="HyperLink1"
runat="server" cssclass="LinkShort"
navigateurl='TeamUsers.aspx?TeamID=<%#((System.Dat a.DataRowView)Container.DataItem)["Team_Name"]
%>'>
<%#((System.Data.DataRowView)Container.DataItem)["Team_Name"] %>
</asp:hyperlink></itemtemplate>
</asp:templatecolumn>

Ken
Microsoft MVP [ASP.NET]


<> wrote in message
news: oups.com...
> <ItemTemplate>
> <asp:HyperLink CssClass="LinkShort" Runat="server"
> NavigateUrl="TeamUsers.aspx?TeamID=<%#((System.Dat a.DataRowView)Container.DataItem)["Team_Name"]
> %>">
> <%#((System.Data.DataRowView)Container.DataItem)["Team_Name"]
> %>
>
> </asp:HyperLink>
>
> </ItemTemplate>
>
> What is wrong with the above statements. I gives me a parser error like
> "The server tag is not well formed."
>
> Any Help?????
>
> Regards,
>
> Amit Arora
>



 
Reply With Quote
 
 
 
 
aroraamit81@gmail.com
Guest
Posts: n/a
 
      03-03-2006
Thanks Man......

 
Reply With Quote
 
Patrick.O.Ige
Guest
Posts: n/a
 
      03-03-2006
Or you could also do it in the ItemdataBound
Patrick

<> wrote in message
news: oups.com...
> Thanks Man......
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyper link in Datagrid Meheraj shaik via .NET 247 ASP .Net 1 07-19-2005 10:36 AM
open default MUA with a hyper link Yann.K Python 9 09-08-2004 06:40 PM
Re: open default MUA with a hyper link Jonathan Ellis Python 2 09-06-2004 08:22 AM
hyper link in DataGrid Alexander Kaplunov ASP .Net Web Controls 3 12-18-2003 05:27 PM
Re: Datagrid and hyper link question? k-re ASP .Net 1 06-25-2003 01:54 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57