DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 07 Jun 2007 22:33:33 -0700,    posted on: microsoft.public.dotnet.framework.aspnet.buildingcontrols        back       

Thread Index
  1    unknown
          2    Teemu Keiski


access dynamically added controls   
Dear All,

Im using ASP.NET 2.0 with C#.
In my aspx page, i have one HTML Table.
Using the javascript i add the rows dynamically.

1.What my problem is how can i access those controls.
   When i click the submit button, i lose all those rows that were
added dynamically.
   How can i persist those rows and how can i access the controls.

2.Also 'm using many checkboxes in cell2 of each row.
  I want to manipulate whether it's checked or not. So i count the
number of checkboxes and              loop through all the controls,
so that i validate whether it's checked or not. How can i count the
controls. Is there any syntax in Javascript like this
Cell2.Controls.Count ?

Help me to over come this problem...
Thanks a lot.
Regards
Raja.
Date:Thu, 07 Jun 2007 22:33:33 -0700   Author:  

Re: access dynamically added controls   
You'd need to work the creation of the controls on the server-side (pass 
information from client to server what to create). It can take some cycles, 
and if you want it look like that to the user, you could just use ASP.NET 
Ajax's UpdatePanel, this way you'd develop like for client-side but it looks 
like as if it happens at the client.

JavaScript does have syntac for that. You'd iterate though form's elements 
or childNodes of a given node or then like this: 
http://geekswithblogs.net/mparsons/archive/2006/03/02/71175.aspx there are 
lots of alternatives


-- 
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net


 wrote in message 
news:1181280813.784585.161700@n15g2000prd.googlegroups.com...

> Dear All,
>
> Im using ASP.NET 2.0 with C#.
> In my aspx page, i have one HTML Table.
> Using the javascript i add the rows dynamically.
>
> 1.What my problem is how can i access those controls.
>   When i click the submit button, i lose all those rows that were
> added dynamically.
>   How can i persist those rows and how can i access the controls.
>
> 2.Also 'm using many checkboxes in cell2 of each row.
>  I want to manipulate whether it's checked or not. So i count the
> number of checkboxes and              loop through all the controls,
> so that i validate whether it's checked or not. How can i count the
> controls. Is there any syntax in Javascript like this
> Cell2.Controls.Count ?
>
> Help me to over come this problem...
> Thanks a lot.
> Regards
> Raja.
> 
Date:Wed, 13 Jun 2007 20:04:05 +0300   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us