[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

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

How do you you replace a Gridview HyperLink with a Button

I want to replace the HyperLink in GridView template with a Button labelled submit which will perform same actions show below. Please show be the replacement code how to do this.

                              <itemtemplate>
                                <asp:HyperLink ID="myForm" runat="server" Text='submit'>
                                    NavigateUrl='<%# "FormDetails.aspx?cust_id=" + Eval("cust_id")%>' />
                            </itemtemplate>
0
tcmmaxt
Asked:
tcmmaxt
2 Solutions
 
siancellCommented:
You can try and use a regular button,
<input type="button" value="submit" onclick="window.location='FormDetails.aspx?cust_id=<%# Eval("cust_id")%>'" />

Place that inside the item template tags.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

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