Solved

gridview button

Posted on 2009-04-06
1
167 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now