Solved

How do you you replace a Gridview HyperLink with a Button

Posted on 2009-04-02
2
247 Views
Last Modified: 2012-05-06
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
Comment
Question by:tcmmaxt
2 Comments
 
LVL 27

Accepted Solution

by:
nmarun earned 125 total points
ID: 24049850
0
 
LVL 4

Assisted Solution

by:siancell
siancell earned 125 total points
ID: 24050386
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

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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question