Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 1.0, Special Edition/1.1
This is the forum to discuss the Wrox book Professional ASP.NET 1.1 by Alex Homer, Dave Sussman, Rob Howard, Brian Francis, Karli Watson, Richard Anderson; ISBN: 9780764558900
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 1.0, Special Edition/1.1 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 4th, 2005, 04:48 PM
Authorized User
 
Join Date: Nov 2005
Location: , , .
Posts: 15
Thanks: 1
Thanked 0 Times in 0 Posts
Default ASP.NET 1.1-Add UserControl at Runtime

In DS.ascx, I have 40 input controls like textboxes, dropdownlist, checkbox, etc. and save buttons etc....

I used this DS.ascx in another control (by dragging and dropping into) "UseDSControl.ascx" by using the following code:

UseDSControl.ascx.vb: g_ctlDS = LoadControl("ctlDS.ascx")

and then when I try to set the control default value (or) accessing values for textbox, it says txtname/chkallow not available. Because it's protected in ctlDS.ascx, I changed it to "public withevents txtname as textbox" but it automatically changes back.

see the following: how to do this in ctlUseDSControl.ascx.vb without writing public properities for each control to set/get values in ctlDS.ascx:

ctlUseDSControl.ascx.vb:

if g_ctlDS.chkAllow then
    'call function 1
else
    'call function 2
end if

g_ctllDS.txtName="ABC"

Please let me know ASAP.


Thanks for your help in advance.
Reply With Quote
  #2 (permalink)  
Old November 4th, 2005, 06:04 PM
Imar's Avatar
Wrox Author
Points: 65,751, Level: 100
Points: 65,751, Level: 100 Points: 65,751, Level: 100 Points: 65,751, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 15,982
Thanks: 64
Thanked 1,350 Times in 1,330 Posts
Default

Cross post of http://p2p.wrox.com/topic.asp?TOPIC_ID=36335. Please see there for answer.

Can you please not cross-post? Also, picking a right forum for your question (e.g. not a book specific one, or general VB.NET but an ASP.NET forum) generally helps in getting a better answer.
Also, ASAP may not be the best way to trigger people to give you a quick answer.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Poveri Fiori (Cilea) by Maria Callas (Track 6 from the album: Maria Callas: The Voice Within the Heart) What's This?
Reply With Quote
  #3 (permalink)  
Old April 8th, 2006, 02:57 AM
Authorized User
 
Join Date: Apr 2006
Location: Dalian, LiaoNing, China.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Great!

Cheers,

guoyi

Reply With Quote
Reply


Thread Tools
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
How to add usercontrol in tooltip KamalRaturi ASP.NET 2.0 Professional 0 October 25th, 2007 09:07 AM
how to get the control in runtime in asp.net page Somesh ASP.NET 2.0 Professional 6 March 7th, 2007 10:33 PM
Add asp.net page to asp project debdemoe Classic ASP Basics 0 August 17th, 2005 12:28 PM
Event in an ASP.NET 2 usercontrol bmains ASP.NET 2.0 Basics 1 February 25th, 2005 02:28 PM
how to add more than one form in asp.net alyeng2000 ASP.NET 1.0 and 1.1 Professional 2 July 19th, 2004 02:58 PM



All times are GMT -4. The time now is 11:39 PM.


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