473,387 Members | 1,650 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,387 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 1652
* "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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.