Click here to Skip to main content
15,905,587 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi.I have a code here where it will capture value from textbox and add in a temporary gridview (not sent to database).
My question is,when a value from textbox is added in the gridview,how to make that value in gridview as a link where it can search the value in google.

Any ideas guys?

XML
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Style="z-index: 106;
    left: 322px; position: absolute; top: 301px">
    <Columns>
    <asp:TemplateField HeaderText="Call Information">
    <ItemTemplate>
    <asp:Label ID="LblName" runat="server" Text='<%#Eval("name")%>'></asp:Label>
    </ItemTemplate>
    </asp:TemplateField>

    <asp:TemplateField HeaderText="">
    <ItemTemplate>
    <asp:Button ID="BtnDelete" runat="server" Text="Clear" OnClick="BtnDelete_Click" />
    </ItemTemplate>
    </asp:TemplateField>
    </Columns>
    </asp:GridView>
Posted

1 solution

couldn't you just do something like:

XML
<ItemTemplate>
<a href='http://www.google.com/#q=<%# Eval("name")%>'>
<%#Eval("name")%></a>
</ItemTemplate>


or you could bind it to a hyperlink control...
 
Share this answer
 
Comments
pwtc222 29-Sep-10 3:31am    
Hi..but i have a problem,this code seems not working in internet explorer.
How to solve this?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900