By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,022 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

Accessing UserControl Custom Properties After Added Programically

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
* "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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.