Executing a Method when i click the template column

N

n.nsiva

Hai All

I have an problem and needs a solution, the problem is described
below..

I have place a datagrid with 3 bound columns and 1 template column
where on that template column i pace a link button web server control
on the item template. Now what i need is whenever i click that
particular linkbutton of a column i want to execute a simple method.

Hope all reply to me.
Sivakumar.N
 
T

Teemu Keiski

Hi,

wire a handler method to the LinkButton in the ItemTemplate

<asp:linkButton ID="..." OnClick="LinkButton_Click" />

It would make the event handler method same for all LinkButtons but you can
get the specific one by casting 'sender' argument to LinkButton. Another way
would be just applying CommandName attribute to it and handling ItemCommand
event (RowCommand in GridView)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,266
Messages
2,571,077
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top