Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:776032
More Search Options
RSS Available
Matching Posts
Find all dynamically generated controls in a dynamically generated table
I am creating a dynamically generated html table (4 columns wide and row number varies) and then inserting a dynamically generated listbox into each row of the first column – All of this is getting done in the Page_Init section. I am trying to do some post-processing of the listboxes by using this code: For Each control In ??????????? < This is where the issue is If TypeOf control Is ListBox Then Dim ListBox As ListBox = CType (control, ListBox) How can I look at all of the controls in the generated
Posted to
Web Forms
(Forum)
by
gallaczmit
on 6/30/2009
Re: Find all dynamically generated controls in a dynamically generated table
When my placeholder was not in a dynamically created table, I was able to get the listboxes using code similar to your example Find Properties of Child Controls Once I placed the placeholder in the table, I can't (or do not know) how to get the lsitboxes.
Posted to
Web Forms
(Forum)
by
gallaczmit
on 6/30/2009
Re: Find all dynamically generated controls in a dynamically generated table
I found my answer - Here is what I came up with: Here is the code to create the dynamic table in the Page_Init section 'creating the table Dim table As New Table() 'specifying table details table.ID = "DynamicTable" table.EnableViewState = True table.Width = 500 Here is the code I used to get into the dynamic table and find all of the list box controls: Dim table As Table = DirectCast(PlaceHolder1.FindControl("DynamicTable"), Table) For Each tablerow As TableRow In table
Posted to
Web Forms
(Forum)
by
gallaczmit
on 6/30/2009
Re: Custom profile vs. seperate database
Second try - Any Ideas? Rich
Posted to
Web Parts and Personalization
(Forum)
by
gallaczmit
on 6/29/2009
Listboxes and page life cycle
I am dynamiclly creating and populating listboxes during the initial page load. Depending on the SQL Select criteria, I may have as few as 2 listboxes or as many as 15. On a post back operation, the dynamiclly created items dissapear. From what I have found, any dynamiclly created control needs to be created and then re-created for normal page operations. My question here is this - what is the best means to hold the contents of a listbox during a postback operation? I have been trying to use an Array
Posted to
Data Presentation Controls
(Forum)
by
gallaczmit
on 6/29/2009
Re: Listboxes and page life cycle
Thanks rushik, placing the code in the Page_Init section worked like a charm. Superguppie - Thanks for the explination on why this works. It made it easer to get my code (or idea) to work. Rich
Posted to
Data Presentation Controls
(Forum)
by
gallaczmit
on 6/29/2009
Drag and Drop for web form list boxes
Is it possible to create Drag and Drop functionality for a pair of list boxes on a web form? I have spent most of the day searching for something like this but all I can find has to do with win forms. Any direction here would be helpful. Rich
Posted to
Client Side Web Development
(Forum)
by
gallaczmit
on 6/27/2009
Re: Capture gridview events inside loginview templates
Worked like a charm - thanks for the direction! Rich
Posted to
Data Presentation Controls
(Forum)
by
gallaczmit
on 6/25/2009
Capture gridview events inside loginview templates
How can I capture the RowDataBound event for a gridview inside the LoggedInTemplate of a LoginView? I think I can use the FindControl property but I am not sure on how to use this in a "Protected Sub GridView1_RowDataBound(ByVal.............. line of code. Rich
Posted to
Data Presentation Controls
(Forum)
by
gallaczmit
on 6/24/2009
Re: Re-order listbox after insert of new items
Thanks for the direction. I came up with this: Public Sub SortListBox(ByRef listbox As ListBox) Dim ListItems As New SortedList() 'add listbox items to SortedList For Each lItem As ListItem In listbox.Items ListItems.Add(lItem.Text, lItem) Next 'clear list box listbox.Items.Clear() 'add sorted items to listbox For i As Integer = 0 To ListItems.Count - 1 listbox.Items.Add(DirectCast(ListItems(ListItems.GetKey(i)), ListItem)) Next End Sub This was based on this link: http://www.411asp.net
Posted to
Data Presentation Controls
(Forum)
by
gallaczmit
on 5/13/2009
Page 1 of 8 (73 items) 1
2
3
4
5
Next >
...
Last »
ASP.NET:
Using WCF RIA Services without Silverlight in Visual Studio 2010 for building 3 tier ASP.NET Applications
Channel 9:
Ping 41: Top stories of 2009, bing, windows 7, laptop hunters, azure
Channel 9:
endpoint.tv - Windows Server AppFabric in action monitoring and troubleshooting
Channel 10:
Windows Marketplace for Mobile Opens to 6.0, 6.1 Phones
Channel 9:
Rx API in depth: Hot and Cold observables
ASP.NET:
Back in Business
TechNet Edge:
Hacking Windows 7 Interview
WindowsClient:
Windows Client Developer Roundup for 12/14/2009
Channel 9:
TWC9: Silverlight Web cam apps, VS extensibility, Explorer shell extensions
ASP.NET:
Visual Studio Project Sample Loading Error: Assembly could not be loaded and will be ignored. Could not load file or assembly or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
WindowsClient:
Working with Windows 7 Taskbar Thumbnail Buttons with WPF 4
WindowsClient:
overflow:hidden -- a fix to a CSS problem
TechNet Edge:
Empowering your teams with SharePoint
TechNet Edge:
TechNet Radio: Expert presents: Creating and Executing a Comprehensive 2007 Office Deployment
ASP.NET:
ViewModel Pattern for Silverlight - Options for Hooking a View to its Model
Channel 9:
Rx API in depth: Concat, Catch and OnErrorResumeNext
Channel 10:
PowerPoint Twitter Tools Updated
Channel 10:
Windows Live Messenger Arrives on Nokia Phones
Channel 9:
Peer to Peer Series Part 7: PeerChannel Basics
TechNet Edge:
Visio: Drawing on Experience with Saveen Reddy
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online