473,657 Members | 2,559 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Custom UserControl Custom Properties After You Add Programatically

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 strAssemblyFile Name As String) As
UserControl
Dim objAssembly As [Assembly] = [Assembly].LoadFrom(strAs semblyFileName)
Dim cControl As UserControl
Try
cControl = objAssembly.Cre ateInstance("Sa mple.UserContro l1")
cControl.UserNa me="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.UserNa me="XXXXX"

Thanks,

Dan

Nov 21 '05 #1
0 1375

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

Similar topics

2
18151
by: Robbie | last post by:
I have a Web Form with some tailored logos and artwork. The web form also has a user control that has typical registration info on it (Name, Company Name, etc.) One of the fields, a TextBox, is a PromoCode which is a field required for each company which registers. I want to programatically set the value of this PromoCode in the host web-form's Page_Load method, but I can't seem to do it. My user control is "RegisterInfo.ascx" (On the...
2
2088
by: John B | last post by:
Hello I want to create a set of controls that have some common methods and properties. I was thinking that I should subclass the UserControl class and add these common features there and then base all my custom controls on this new MyUserControl Class. Is this the way to go? The MyUserControl would not actually have any UI component and should be abstract I think. Does this mena that I should not create the control by just selecting...
2
1658
by: Jason Wright via .NET 247 | last post by:
Hiya, I've created a UserControl with some Custom properties and assigned databinding expressions to the properties in the aspx. Does anyone know why these expressions are not being evaluated? eg. <uc1:ControlX id="la" runat="server" ClientClick='javascriptfunction(<%# DataBinder.Eval(Container.DataItem, "Id")%>)' /> after processing renders in html as <table id="la" onclick="javascriptfunction(<%#...
1
1318
by: chambersdon | last post by:
How do I get the public properties of my custom control to show in the designer. The properties are all Strings but they do not show up in the designer property window. My custom control inherits from: System.Web.UI.UserControl I have the following property: Public Property workUnitCode() As String ....
4
1579
by: Alexander Widera | last post by:
How can I include an usercotrol into an other usercontrol... for example: <UserControl:First runat="server" id="firstUC" content="..." /> and i want to refer an other UserControl (e.g. called "Second") to the property "content" of usercontrol "First". Thanks for help
2
1674
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 appreciated!!!! Thanks,
2
2433
by: AMDRIT | last post by:
Hello everyone, I have created a custom component and one of its properties is a class object with it's own properties. During runtime, I can assign values to the class object properties just fine. However, when attempting to assing default values as designtime in the propertygrid, nothing is working on the class object. I know that I am doing it wrong, any ideas what it is? Thanks in advance
7
1876
by: Nathan Sokalski | last post by:
I have a UserControl (*.ascx) that has the following design: <div id="divFileDir" runat="server"> <asp:Image ID="imgIcon" runat="server" CssClass="icon" Height="16px" Width="16px"/> <asp:LinkButton ID="lnkName" runat="server" CssClass="filedir" CausesValidation="false"/> <asp:Label ID="lblSize" runat="server" CssClass="size"/> <asp:Label ID="lblDate" runat="server" CssClass="date"/> </div>
3
1312
by: Cyr1dian | last post by:
Hi, My problem is that a custom control "newA" that inherits from a base custom control "baseA" is not displaying any contained controls - that were not inherited - at run time, but displays them fine at design time. I'll give a short example: public class baseA: UserControl
0
8305
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.