PC Review


Reply
Thread Tools Rate Thread

Accessing UserControl Custom Properties After Added Programically

 
 
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
Accessing MasterPage Properties from a usercontrol on a contentpage?? wildman@noclient.net Microsoft ASP .NET 2 26th Feb 2008 01:33 PM
Accessing Properties of Dynamically added Web User Controls =?Utf-8?B?QnJpYW4=?= Microsoft ASP .NET 1 6th May 2005 05:13 PM
Accessing usercontrol properties from another page - SERVER-SIDE John Microsoft ASP .NET 2 17th Oct 2004 04:50 PM
Custom UserControl Custom Properties After You Add Programatically Daniel Friend Microsoft VB .NET 0 20th Aug 2004 06:14 PM
Accessing UserControl Custom Properties After Added Programically Daniel Friend Microsoft VB .NET 2 20th Aug 2004 12:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:49 PM.