473,396 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

LinkButton Events

I have 2 datagrids, lets call them src and dest. I run a query and databind
to src. Src contains a column called "name".

I use a templatecolumn to display the name as a LinkButton. I want the user
to be able to click on a name, which will then run another query and display
all the records pertaining to that name in the dest datagrid.

How do I set this up? Can I use a linkButton to do this? Which events should
I trap and how do i get the name of the clicked name?

Bijoy
Nov 18 '05 #1
1 1308
Bijoy,
You might wanna take a look at:
http://openmymind.net/databinding/index.html#8

Which talks about how to handle events within a repeater. The basic idea is
that the LinkButton event bubbles up to the repeater/datagrid which you can
then catch in the ItemCommand event. At this point you can access the
commandArgument and the commandName to figure out which button fired and get
a variable (like the name)

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Bijoy Naick" <b_*****@yahoo.ca> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I have 2 datagrids, lets call them src and dest. I run a query and databind to src. Src contains a column called "name".

I use a templatecolumn to display the name as a LinkButton. I want the user to be able to click on a name, which will then run another query and display all the records pertaining to that name in the dest datagrid.

How do I set this up? Can I use a linkButton to do this? Which events should I trap and how do i get the name of the clicked name?

Bijoy

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Assaf Weinberg | last post by:
Using ASP.NET web form with VB.NET I have a page with a calendar control that onSelectionChanged builds a table control showing the events scheduled for the selected calendar days. One of the...
1
by: Mark | last post by:
I have two buttons in a DataGrid. If I leave the ButtonType = "LinkButton", the EditCommand and DeleteCommand events fire fine. If I change th ButtonType = "PushButton", the events do not fire. ...
10
by: Bharat | last post by:
Hi Folks, Suppose I have two link button on a page (say lnkBtn1 and lnkBtn2). On the click event of the lnkbtn1 I have to add a dynamically created control. And On the click event of the lnkBtn2 I...
5
by: Steve Harclerode | last post by:
Here's some code that I'm using to create a simple list of logical drive letters (my web application impersonates a user). I'm finding that my event handler doesn't fire. Can anyone give me a hint...
3
by: JoakimR | last post by:
Hello, I have a problem with events not firing. I've created a web user control which renders a calendar using a table control. In two cells I'm adding LinkButtons for "prev/next month". However,...
4
by: Fueled | last post by:
Hi everyone! I've made quite a lot of research on this, and I've tried a couple of proposed solutions. Nothing has worked for me, but I feel there's not much I'm missing. So I'm turning to this...
3
by: MRW | last post by:
I have a simple linkbutton and a function when it's clicked. It works perfectly in a regular .aspx page. However, when I place it inside the ContentPlaceHolder, it no longer works. It does...
13
by: rn5a | last post by:
In a shopping cart app, suppose a user has placed 5 orders, I want to show him 5 LinkButtons (one for each order) so that when he clicks the first LinkButton, he would be shown the details of his...
2
by: Mufasa | last post by:
I have code to dynamically generate some link buttons (It's not know how many are needed until runtime.) I am adding the linkbutton to a cell in a table and the adding works fine. It's firing of...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.