Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 September 4th, 2005, 03:54 AM
Authorized User
 
Join Date: Jan 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to yeetesh
Default identify textboxes in table for manipulation

I am creating textboxes and add in to table(text boxes and tables both are being generated at runtime).Now i need to identify textboxes so that i Could make some calculations.I am unable to identify the textboxes .how can i provide them a unique identity. can some one help me plz it's urgent.

 
Old September 4th, 2005, 11:27 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

When you create your textboxes, you have to give them an ID or Name to be able to identify them. Then you have to loop through all the controls on the page:

  Private Sub IterateThroughChildren(ByVal parent As Control)
        '''
        Dim c As Control
        For Each c In parent.Controls
          If c.GetType().ToString().Equals("System.Web.UI.WebCo ntrols.TextBox") Then
             Dim tb As TextBox
             tb = CType(c, TextBox)
             '''Here you can grab the values of the textbox and do what you want ...

        Next c

    End Sub 'IterateThroughChildren






Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL to identify the primary key in a table? dbayona SQL Server 2005 1 October 24th, 2007 02:33 AM
add row with textboxes in a table imnk2 ASP.NET 1.0 and 1.1 Basics 1 June 25th, 2007 04:53 PM
Access import and table manipulation scubasteve Access 1 June 12th, 2006 12:57 PM
ADO vs DAO for table manipulation hashtlishnii Access VBA 3 September 26th, 2005 09:10 PM
Store Data From textboxes which form Table gadhiav ASP.NET 1.0 and 1.1 Basics 7 June 30th, 2004 11:10 PM





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