Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 14th, 2004, 10:03 AM
Registered User
 
Join Date: Jun 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Repeater

I want to accede the data of a repeater.The data this in textbox :
<ItemTemplate>
<tr bgcolor="#ffffff">
<td width="50" align="center"> <INPUT type="text" style="Width=40px; TEXT-ALIGN:center" value='<%# DataBinder.Eval(Container.DataItem,"Pequeño") %>'>
</td>



 
Old June 14th, 2004, 11:36 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

I suggest u to use DataGrid or a list to make it more simple! u can make ur needed settings in Visual mode there!

HTH.

Always:),
Hovik Melkomian.
 
Old June 15th, 2004, 12:02 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

When do you want to access the data?
You can access the data when the item is created, in a situation where you want to total the values at the end for example.
Or you can access the data on an event, like if you need to know the value of the text box when a button is clicked on that line.
I think it will have to be a <asp:textbox> control with runat server, It will definately need an id.
Code in the "_ItemCommand" or the "_ItemCreated" event depending on your need.
The text of the text box can be obtained with:
TheValue = ((TextBox) e.Item.FindControl("TheTextBoxName")).Text;

Above code is untested and in c#.
TheValue will be a string.
With the item created event you will need to be sure that the item type is a item template as the header will not contain the textbox and will throw an error
eg. e.Item.ItemType == ListItemType.Item

======================================
They say, best men are moulded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================





Similar Threads
Thread Thread Starter Forum Replies Last Post
why do Repeater is used... kk_katepally General .NET 1 December 22nd, 2004 06:36 PM
Repeater chiraagb ADO.NET 1 May 31st, 2004 02:35 PM
Repeater collie VB.NET 2002/2003 Basics 1 December 2nd, 2003 05:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.