Programmatically creating a asp.net 2.0 linkbutton

G

Guest

Hi there,

The other day I tried to programmatically create an asp.net linkbutton
during my Page_Load() event and attach a click event handler to the
linkbutton, then add that linkbutton control to a particular cell in a
gridview control. The button appeared where I expected it on the page but
when I clicked on it, the button just disappeared. I was in debug mode with
a breakpoint set up in my click event handler and the debugger never caught
the breakpoint, so I'm guessing the click event was never fired. Any ideas?
I can try to whip up a code sample if you think it'll help explain my
situation.

Thanks in advance =-)
- Gabe
 
T

tfsmag

if you're putting it inside of the gridview, why aren't you doing so in
the gridview_onrowdatabound event? Is it for every row? What is it
you're trying to accomplish?

Code would be helpful to solve your problem.
 
G

Guest

Thanks for your super-quick reply =-)

I have since come up with a different solution that doesn't cause me any
problems (not using gridview or dynamic linkbuttons anymore). If I have some
free time tomorrow, I'll try putting a code sample together just to show you
exactly what was going wrong. But it's not super critical anymore.

In any event, thanks again for your quick response.
- Gabe
 
T

tfsmag

No problem, things are kinda slow today so i figured I'd hop on here
and see if I could help out and maybe learn something in the process :D
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top