Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 4th, 2006, 01:16 AM
Authorized User
 
Join Date: Oct 2004
Location: Bangalore, Karnataka, India.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamic user control- not able to set values

Hello experts,
 For Last few days I'm stuck with a user control. Would like to appriciate if some one could get me out from the hazzard.

My problem.
I have a user control with some text boxes and drop down list.
(It is a "from" date select , a "to" date select and a price text box)
I need this user control to repeat untill the number of records in a table.

So I tried dynamically loading the user control and have used the following code
Code:
for(iLoop = 1;iLoop<=iSeasonCount;iLoop++)
    {
        objSeason = LoadControl("UserCtrls/seasons.ascx");
        objSeason.ID = "Seasons" + iLoop;
        dvSeasons.Controls.Add(objSeason);
        objSeason.Dispose();
    }
And this code is very well displaying the controls on the page.
But the problem is that Im not able to set values to the user control feilds from the parent page.

I have already converted the protected control objects in the user control to public.
I'm able to assign the values when im placing the control in the aspx page as a tag.
I have tried with find control method as well.

I hope someone will be there to help me out.
Thanks in Advance!


 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create Dynamic User Control Prabhakar_dt ASP.NET 2.0 Professional 1 June 6th, 2007 07:30 AM
examples of dynamic user control vegeta4ss BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 June 4th, 2007 03:26 PM
Set Focus to Field in User Control Ron Howerton ASP.NET 1.0 and 1.1 Professional 3 March 14th, 2006 05:53 PM
Dynamic user control problem sandeep General .NET 0 September 26th, 2005 09:42 AM



All times are GMT -4. The time now is 09:04 PM.


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