Selecting Item in a Repeater list

J

JesperGJensen

I have a list of 5 streets. I need to list these 5 streets to a user
who must then be able to click a street and select the street.

I had thought of using a Repeater control to liste the 5 streets and
in each ItemTemplate create a LinkButton.
If i do this i create a Selected_Changed method and have all
Linkbuttons link to this one method.
But how do i then differentiate between which of the 5 streets was
clicked?


This is for an address selection page, where the user can select
previous addresses, click an address and prefill textboxes based on
the data.

Is there another way to display a list of objects, select one and
execute code on this object, besides doing a Repeater like approach?

Thanks in advance
 
S

Scott Roberts

I would populate the CommandArgument property of each LinkButton, then read
that property in the Selected_Changed event.
 

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

Top