473,465 Members | 1,849 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Repater Control

I want to use a repeater to display a button for every item in the cache.
Each button should have the key of the cache object as its Text property and
it should remove that particular object from the cache.
So if I have two objects in the cache with keys key1, key2, respectively,
the buttons should be labeled and named so. On click of the button key1, the
following should occur:

Cache.Remove(key1);

Can anyone help?

Hector
Nov 16 '05 #1
2 1591
Hi,

If you were asking about the Repeater web control
(System.Web.UI.WebControls.Repeater class), then a more appropriate group is
microsoft.public.dotnet.framework.aspnet.

Anyway, bind the CommandName property of the button to the key in the
datasource. Then attach to the repeater's ItemCommand event. You will be
able to find out which button was clicked if you look up the CommandName
property of the second parameter passed to the handler.

Greetings
Martin Dechev
ASP.NET MVP
"hecsan07" <he******@hotmail.com> wrote in message
news:75**********************************@microsof t.com...
I want to use a repeater to display a button for every item in the cache.
Each button should have the key of the cache object as its Text property and it should remove that particular object from the cache.
So if I have two objects in the cache with keys key1, key2, respectively,
the buttons should be labeled and named so. On click of the button key1, the following should occur:

Cache.Remove(key1);

Can anyone help?

Hector

Nov 16 '05 #2
Hi,

If you were asking about the Repeater web control
(System.Web.UI.WebControls.Repeater class), then a more appropriate group is
microsoft.public.dotnet.framework.aspnet.

Anyway, bind the CommandName property of the button to the key in the
datasource. Then attach to the repeater's ItemCommand event. You will be
able to find out which button was clicked if you look up the CommandName
property of the second parameter passed to the handler.

Greetings
Martin Dechev
ASP.NET MVP
"hecsan07" <he******@hotmail.com> wrote in message
news:75**********************************@microsof t.com...
I want to use a repeater to display a button for every item in the cache.
Each button should have the key of the cache object as its Text property and it should remove that particular object from the cache.
So if I have two objects in the cache with keys key1, key2, respectively,
the buttons should be labeled and named so. On click of the button key1, the following should occur:

Cache.Remove(key1);

Can anyone help?

Hector

Nov 16 '05 #3

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

Similar topics

6
by: Bruce Rusk | last post by:
I'm using Stephen Lebans' RTF2 control in a report, and have discovered what may be a slight bug in it. I have a lot of non-Western language (Chinese) text in my RTF field, and such records get...
6
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header"...
2
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
20
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
2
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is...
4
by: gsb58 | last post by:
Hi! On a form I have a calendar. The form is rezised to 1024x768 (Don't worry - this is a training case) when loaded. Now I want to center the calendar on the form so that its edges are...
5
by: paul.hester | last post by:
Hi all, I have a custom control with an overridden Render method. Inside this method I'm rendering each control in its collection using their RenderControl method. However, I'm running into a...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
1
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.