PC Review


Reply
Thread Tools Rate Thread

Custom UserControl Custom Properties After You Add Programatically

 
 
Daniel Friend
Guest
Posts: n/a
 
      20th Aug 2004
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!!!!

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



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programmaticly load a custom UserControl with in a custom class which implements an ITemplate LaptopHeaven Microsoft ASP .NET 0 5th Oct 2006 01:36 PM
Accessing UserControl Custom Properties After Added Programically Daniel Friend Microsoft VB .NET 0 20th Aug 2004 03:30 PM
Accessing UserControl Custom Properties After Added Programically Daniel Friend Microsoft VB .NET 2 20th Aug 2004 12:27 AM
DataBinding expressions are not evaluated on Custom Properties of a UserControl Jason Wright via .NET 247 Microsoft ASP .NET 2 12th Jun 2004 05:24 PM
Loading UserControl dynamically and settings its custom properties on the fly? Richard Wangler Microsoft ASP .NET 2 12th Mar 2004 07:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:03 AM.