Solved

gridview button

Posted on 2009-04-06
1
170 Views
Last Modified: 2013-12-17
Hi,

I have a grid view and a custom button like so

       <asp:TemplateField HeaderText="View">
            <ItemTemplate>
                <asp:Button ID="bthView" runat="server" Text="View" OnClick="cmdView" />
            </ItemTemplate>
            </asp:TemplateField>

then in the backend c# I am trying to wire it up as so

    protected void cmdView_Click(object sender, EventArgs e)
    {
        txtHeading.Text = "test";
   
    }

but this wont work so wht am i missing please help

Thanks,

R8VI
0
Comment
Question by:R8VI
1 Comment
 
LVL 5

Accepted Solution

by:
mrcoolcoder earned 500 total points
ID: 24082926
Try this markup:

     <asp:TemplateField HeaderText="View">
            <ItemTemplate>
                <asp:Button ID="bthView" runat="server" Text="View" OnClick="cmdView_Click" />
            </ItemTemplate>
            </asp:TemplateField>
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

786 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