473,397 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Accessing UserControl Custom Properties After Added Programically

Hello,

I have added a custom usercontrol programically and all works fine... I
would like to change some custom properties that I have set in that
usercontrol.

Any help would be greatly appreciated!!!!

Thanks,

Dan
Nov 21 '05 #1
2 1654
* "Daniel Friend" <da*@donotspam.com> scripsit:
I have added a custom usercontrol programically and all works fine... I
would like to change some custom properties that I have set in that
usercontrol.


Can you be more specific? What doesn't work? What do you want to
archieve?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2
Herfried:

Here is a sample of What I am doing:

Private Function ClassByControl(ByVal strAssemblyFileName As String) As
UserControl
Dim objAssembly As [Assembly] = [Assembly].LoadFrom(strAssemblyFileName)
Dim cControl As UserControl
Try
cControl = objAssembly.CreateInstance("Sample.UserControl1")
cControl.UserName="XXXXX"
Catch
End Try
End Function

In the Control I have the Following Propert Set:

Public Property Username() As String
Get
Return ssUsername
End Get
Set(ByVal Value As String)
ssUsername = Value
End Set
End Property

There error happens on cControl.UserName="XXXXX"
Thanks,

Dan
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2o************@uni-berlin.de...
* "Daniel Friend" <da*@donotspam.com> scripsit:
I have added a custom usercontrol programically and all works fine... I
would like to change some custom properties that I have set in that
usercontrol.


Can you be more specific? What doesn't work? What do you want to
archieve?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Oliver | last post by:
hi all - - I'm probably a) completely wrong b) the umpteenth person too mention it - but I'm struggling to identify how to best work with re-usable units of UI on an ASP page. the problem is...
1
by: Kepler | last post by:
I have a custom control that is thrown onto a UserControl that is thrown onto a WebForm. Basically, I've got a scenario where if my UserControl sets an attribute on the custom control in the ascx,...
1
by: Jeff Smith | last post by:
Can I load custom web user controls dynamically and access the properties and methods without having to explicitly define custom control types (example 2 below). I have custom web control named...
13
by: Michael Maes | last post by:
Hi, I have a UserControl containing some controls of which one is a ComboBox. All the InternalControls are Private and some are allowed to be accessed through Public Methods. One of the things I...
21
by: Simon Verona | last post by:
Hope somebody can help! I want to automatically be able to add code to the initialize routine on a Windows form when I add a custom control that I've written to a form. Specifically, I'm trying...
0
by: Daniel Friend | last post by:
Hello, I have added a custom usercontrol programically and all works fine... I would like to change some custom properties that I have set in that usercontrol. Any help would be greatly...
0
by: Daniel Friend | last post by:
Hello, I have added a custom usercontrol programically and all works fine... I would like to change some custom properties that I have set in that usercontrol. Any help would be greatly...
9
by: Marcelo Cabrera | last post by:
Hi, I have a user control that in turn creates a bunch of webcontrols dynamically and handles the events these webcontrols raise. It used to work fine on ASP .Net 1.1 but when compiled on 2.0 it...
2
by: Mark Collard | last post by:
The ToolBar control allows you to add toolbar buttons. When you add a button, the button is not only displayed in the toolbar, but also added as a separator control in the form/usercontrol your...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.