CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 8/7/2003 9:25:22 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 21 Favorited: 0 Favorite
4 Items, 1 Pages 1 |< << Go >> >|
pj_funk
Asp.Net User
Dynamically create non-fixed number of TextBoxes in Composite Control8/7/2003 9:25:22 PM

0/0

Hi,

I have a composite control(TextBoxControl.cs) in my DynamicTextBox.aspx. On the Page_Load of the DynamicTextBox.aspx page, I am calling a business tier assembly, which is returning an ArrayList containing an unknown amount of objects. I would like to pass this ArrayList to my composite control and for each object in the ArrayList, I would like to build and populate a TextBox. The reason I need to pass the data to the composite control is because I would like to reuse this control on multiple pages in the application.

Currently, I am able to get the data from the business tier assembly directly from the composite control's CreateChildControls() method, and create the Textboxes. The problem I am having is passing the data from the Page_Load event of the parent DynamicTextBox.aspx and having the controls show up on the page. The data gets to the control's CreateChildControls() event and I watch it in Debug go through and create the controls, but when the page renders, the controls are not there. What gives? :) I tried passing the data from the DynamicTextBox.aspx page's On_Init, but the same result as Page_Load occured.

Does anyone know why the TextBoxes are not rendering or have any insight as to what I am doing wrong?



Thanks in advance for your time and help,

Paul
kdbryant
Asp.Net User
Re: Dynamically create non-fixed number of TextBoxes in Composite Control8/7/2003 10:01:23 PM

0/0

Can you just put some timers on the textbox controls?


Regards,

Bioya

Thanks





Kelley Bryant
pj_funk
Asp.Net User
Re: Dynamically create non-fixed number of TextBoxes in Composite Control8/7/2003 10:24:01 PM

0/0

Thanks for the reply. I don't think we are on the same page. Let me know if a part of the explanation is unclear.

Thanks,

Paul
pj_funk
Asp.Net User
Re: Dynamically create non-fixed number of TextBoxes in Composite Control8/15/2003 12:41:21 AM

0/0

I found a fix!!! I was reading a book from Jeff Prosise called "Programming Microsoft .NET" and saw the light. On page 338 he explains how to dynamically load controls onto the page. I set asp:placeholders on the page where I want my control to be rendered, then did this in my code behind of the parent page:

ArrayList myList = PJObject2.GetPJData();
TestControl myTestControl = (TestControl) LoadControl("TestControl.ascx");
myTestControl.myList = myList;
myTestControl.isPJObject2 = true;
myTestControlPlaceHolder.Controls.Add(myTestControl);

In the control, TestControl.ascx, I was able to access the properties "myList" and "isPJObject2" in the "CreateChildControls" method.

Thanks for the help,

Paul
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Visio 2002 Developer's Survival Pack Authors: Graham Wideman, Pages: 482, Published: 2001
A Practical Guide to Localization Authors: Bert Esselink, Pages: 488, Published: 2000

Web:
Dynamically create non-fixed number of TextBoxes in Composite ... Dynamically create non-fixed number of TextBoxes in Composite Control. Last post 08-14-2003 8:43 PM by pj_funk. 3 replies. Sort Posts: ...
TextBox in composite control - ng.asp-net-forum.windows ... Visit Dev Shed to discuss TextBox+RegExpValidator Composite Control. Dynamically create non-fixed number of TextBoxes in Composite . ...
Create Textboxes at run time. - ASP.NET General Dynamically create non-fixed number of TextBoxes in Composite Control, Paul, ASP .NET Building Controls, 5, 08-15-2003 01:37 AM. 80 pages to create! ...
Create RTMP dynamically - Macromedia Flash Flashcom Dynamically create non-fixed number of TextBoxes in Composite Control, Paul, ASP .NET Building Controls, 5, 08-15-2003 01:37 AM ...
CodeProject: An ASP.NET Composite Control for US and UK dates ... Sep 29, 2003 ... I chose to create a Composite Control over a User Control so I could .... HTML control's client events dynamically when the page loads. .... I will work on updating the control for 2005, but it will be some time before I can get it fixed. ... within a Web Form relative to other TextBoxes and Labels? ...
Nikhil Kothari's Weblog : Atlas M2.2 - Dynamic UpdatePanels (finally) This opens up a number of scenarios including UpdatePanels inside ... It is a simple PhotoViewer composite control that contains an Image ..... Create a website, enable atlas in it, i.e. follow the steps in the Atlas docs to add Microsoft. .... and that tool changes the background of those two textboxes to yellow. ...
2-D Transforms Sample ... RoutedCommand Sample \Core\Custom_RoutedCommand Create a Data ... Dynamic Navigation over a Fixed Hierarchical Topology Sample ... Hosting a Windows Forms Composite Control in Windows Presentation Foundation .... in a TextBox Sample \Editing\TextBox_SpacePreserve ...
ASP.NET Development May 21, 2005 ... Dynamically creating a web form with server controls · Server-Side/Client-Side Problem ... How to set the DataGrid Row Size to a fixed size. Web.Config and Authentication ... Restrict number of concurrent login - Help me olease ... non- us date format · Accessing textbox control in a table cell ...
A Crash Course on ASP.NET Control Development: Managing Postbacks ... Non-interactive controls serve the purpose of displaying data in a way ... The TextBox control captures and sends to the server any data the user types inside of it. ... The TrackBar control is created as a composite control and given a few ... The central cell has a fixed width—normally a few pixels—and behaves ...
It Could Be Done!: June 2007 The problem is fixed by wrapping user control initialization in: ..... It is intended to be used by control authors to create composite controls. ... Again different nodes create different number of TextBoxes or Buttons on the right. ... NET, nothing prevents you from creating control dynamically and using the ...




Search This Site:










using the virtualpathutility class

pageerror

is there an event handler for when the browser is closed?

ui for database design

error - string methods do not exist

how can i grab just the first n records in a sql statement?

wwf designer and assemblies in vs 2005 & .net foundation 2.0

controlling ascx page in aspx page

where can i find a beginner tutorial for making a login/members only page?

passing values between web forms pages

asp.net detect browser refresh button ?????????

crystal reports

want to query sql server and put results in text boxes.

"__dopostback is not defined" - webresource.axd is not being rendered in the page!

self inflicted password issue

simple guestbook with pictures

how to change the grey text color on a disabled textbox?

quick question about dropdownlist..

sessions

godaddy help

how to send sms through .net

commercial image resizing .net software?

style a wizard control using css

user tracking

object casting (or mayb i should say conversion, explicit/implicit???)...

error with stateserver configuration

trim questions

get a list of folders (names) in a direcrory

wizardsteps and repeater

a default role for users registering on my website

  Privacy | Contact Us
All Times Are GMT