Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

hyperlink in datagrid

hi

   I want to use a hyperlink column in datagrid. I know i have to use template column for this. Clicking on this link should redirect to another page along with one parameter in query string.

wht is the exact code for this.

thanks
sandeep
0
sandeep437
Asked:
sandeep437
1 Solution
 
gregoryyoungCommented:
       <asp:TemplateColumn HeaderText="au_fname" SortExpression="au_fname">
          <ItemTemplate>
            <asp:NavigateUrl runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "somefield") %>' NavigateUrl='yoururlstring?param=<%# DataBinder.Eval(Container.DataItem, "someotherfield") %>'/>
          </ItemTemplate>
        </asp:TemplateColumn>

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now