473,785 Members | 2,612 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

User Control Doesn't Inherits the Property Added after using it...

Hai,

I've Created a User control for example a Button and i've given the font
of the text as Bold and compiled it. Now i've used this Usercontrol
everywhere in my project. Now i changed the font from Bold Italic to Regular,
and also changed the color. now in my project the changes are not inhertied
in already placed user control Buttons. but if i place a new button then i
can see the latest changes...

what can i do to inherit the latest property into my user control buttons
already exist in my project...
--
Peter...
Nov 21 '05 #1
14 1300
Prabhudhas Peter wrote:
Hai,

I've Created a User control for example a Button and i've given the font
of the text as Bold and compiled it. Now i've used this Usercontrol
everywhere in my project. Now i changed the font from Bold Italic to Regular,
and also changed the color. now in my project the changes are not inhertied
in already placed user control Buttons. but if i place a new button then i
can see the latest changes...

what can i do to inherit the latest property into my user control buttons
already exist in my project...


Are you using [DefaultValue(.. .)] attribute?
Nov 21 '05 #2
No I am not using [DefaultValue(.. .)] attribute... what is that...plz let
know about that also....
--
Peter...
"ナ「kasz" wrote:
Prabhudhas Peter wrote:
Hai,

I've Created a User control for example a Button and i've given the font
of the text as Bold and compiled it. Now i've used this Usercontrol
everywhere in my project. Now i changed the font from Bold Italic to Regular,
and also changed the color. now in my project the changes are not inhertied
in already placed user control Buttons. but if i place a new button then i
can see the latest changes...

what can i do to inherit the latest property into my user control buttons
already exist in my project...


Are you using [DefaultValue(.. .)] attribute?

Nov 21 '05 #3
No I am not using [DefaultValue(.. .)] attribute... what is that...plz let
know about that also....
--
Peter...
"ナ「kasz" wrote:
Prabhudhas Peter wrote:
Hai,

I've Created a User control for example a Button and i've given the font
of the text as Bold and compiled it. Now i've used this Usercontrol
everywhere in my project. Now i changed the font from Bold Italic to Regular,
and also changed the color. now in my project the changes are not inhertied
in already placed user control Buttons. but if i place a new button then i
can see the latest changes...

what can i do to inherit the latest property into my user control buttons
already exist in my project...


Are you using [DefaultValue(.. .)] attribute?

Nov 21 '05 #4
Prabhudhas Peter wrote:
No I am not using [DefaultValue(.. .)] attribute... what is that...plz let
know about that also....


DefaultValue attribute specifies the default value for a property.
Example: (you have int ABC property and dafault value for this is 7)

[Browsable(true) ,DefaultValue(7 )]
int ABC
{
get { return _abc; }
set { _abc = value; }
}

」ukasz
Nov 21 '05 #5
OK thank u...

but i need more info on my prevous psot...please help me..
--
Peter...
"ナ「kasz" wrote:
Prabhudhas Peter wrote:
No I am not using [DefaultValue(.. .)] attribute... what is that...plz let
know about that also....


DefaultValue attribute specifies the default value for a property.
Example: (you have int ABC property and dafault value for this is 7)

[Browsable(true) ,DefaultValue(7 )]
int ABC
{
get { return _abc; }
set { _abc = value; }
}

ナ「kasz

Nov 21 '05 #6
Mr. ナ「kasz

Please give me the solution for my question...if you did not understand my
Question please let me know i'll explain u more
--
Peter...
"Prabhudhas Peter" wrote:
OK thank u...

but i need more info on my prevous psot...please help me..
--
Peter...
"ナ「kasz" wrote:
Prabhudhas Peter wrote:
No I am not using [DefaultValue(.. .)] attribute... what is that...plz let
know about that also....


DefaultValue attribute specifies the default value for a property.
Example: (you have int ABC property and dafault value for this is 7)

[Browsable(true) ,DefaultValue(7 )]
int ABC
{
get { return _abc; }
set { _abc = value; }
}

ナ「kasz

Nov 21 '05 #7
Peter,

Assuming that it is in your project, did you already rebuild your complete
project?

Cor
Nov 21 '05 #8
you need to post more information
usercontrol does not inherit propertys
are you trying to inherit the usercontrol?
are you trying to inherit to the user control?

if your trying to inherit the user control you must have
public mustinherit property
bla bla bla

if you are trying to inherit to the user control::
need more infomration on what your trying to do here

are you making a web control library?
are you making a windows control library?

all this information makes a difference.. Please post more info
"Prabhudhas Peter" <Pr************ *@discussions.m icrosoft.com> wrote in
message news:F2******** *************** ***********@mic rosoft.com...
Mr. Lukasz

Please give me the solution for my question...if you did not understand my
Question please let me know i'll explain u more
--
Peter...
"Prabhudhas Peter" wrote:
OK thank u...

but i need more info on my prevous psot...please help me..
--
Peter...
"Lukasz" wrote:
> Prabhudhas Peter wrote:
> > No I am not using [DefaultValue(.. .)] attribute... what is that...plz
> > let
> > know about that also....
>
> DefaultValue attribute specifies the default value for a property.
> Example: (you have int ABC property and dafault value for this is 7)
>
> [Browsable(true) ,DefaultValue(7 )]
> int ABC
> {
> get { return _abc; }
> set { _abc = value; }
> }
>
> Lukasz
>

Nov 21 '05 #9
OK...All Let me expalin the scenario More clearly:

Consider I've created a User Control for Button.
And I've set the font property in the Code Editer as follows:
(i've written the code in the InitializeCompo nent() subprogramm itself)

############### ############### ############### ####
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub
InitializeCompo nent()
'
'usrButton
'
Me.BackColor = System.Drawing. Color.AliceBlue
Me.Font = New System.Drawing. Font("Arial", 8.0!, _

System.Drawing. FontStyle.Regul ar, _

System.Drawing. GraphicsUnit.Po int, CType(0, Byte))
Me.Name = "usrButton"

End Sub
############### ############### ############### #

I've used this function everywhere in my project...
Now i want to change the font Property to "Book Antiqua" & size to 10....

If i change the code here...and i've rebulit the project... now i cant see
tha latest change in the existing Buttons in my project...but if I place a
new control in my project i can see tha latest changes...

So please let me know :
* what should i do to reflect my changes in the existing controls
* whether my approch was correct or not...Is tis the proper way of creating
a
user control.
* If I've done the wrong approach the what is the correct way
* Where can i get the useful information regarding creating the Usercontrols

eagerly awaiting ur reply

--
Peter...
"Cor Ligthert [MVP]" wrote:
Peter,

Assuming that it is in your project, did you already rebuild your complete
project?

Cor

Nov 21 '05 #10

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

Similar topics

5
1517
by: Dan Nash | last post by:
Hi all, I've got a page with a user control on, added via VS. I'm trying to get to a property of the user control (or more precisely, a public var). Here's the code at the top of my aspx page... <%@ Register TagPrefix="dI2" TagName="dartsUC_rolodexsearch" Src="dartsUC_rolodexsearch.ascx" %>
0
2011
by: Tom | last post by:
I am having a really annoying issue with serialization and a .NET User Control I am writing. For example, let's say I have a couple of classes in my control - first class is like: Public Class User Private _UserName As String Private _UserCity As String <System.ComponentModel.CategoryAttribute("User Info")> _ Public Property UserName() As String Get
4
2540
by: Michael | last post by:
Dear all .. If I want to use develop a user control and declare a public property which the type is System.Windows.Forms.GridTableStylesCollection For example : Public Class LookAndView Inherits System.Windows.Forms.UserControl Private _Collection As GridTableStylesCollection
5
2879
by: c676228 | last post by:
Hi, I guess I am confused. In aspx script, I mean (you won't use Codebehind="enrollinfo.aspx.vb", but mix code with html and code together) You can access user control's property directly. Since I am useing visual studio .net, the html and code are seperated. I have the following aspx code which has two user controls: <%@ Register TagPrefix="Subway" TagName="Peopleinfo" Src="Peopleinfo.ascx" %> <%@ Register TagPrefix="Subway"...
6
4076
by: evandelagrammaticas | last post by:
Hi all. I have spent the better part of a day scouring the newsgroups and I am sure that I must have come across the solution a number of times - but I am still a real newbie at asp.net so please forgive me beforehand if I ask anything really simple or ridiculous. I am going to simplify my query... the structure of my example is ---> page1.aspx ------> page1.aspx.vb --->control1.ascx for the sake of simplicity this is what I am trying...
2
15071
by: ChrisCicc | last post by:
Hi All, I got a real doozy here. I have read hundreds upon hundreds of forum posts and found numerous others who have replicated this problem, but have yet to find a solution. Through testing I have been able to find the cause of the problem, and will describe it here first textually and then through a code example. The purpose of what I am trying to do is to create a postback-free web application through the use of ASP.net AJAX UpdatePanels...
11
1684
by: Web Search Store | last post by:
Hello, I set up a web page with 2 user controls. In classic asp, the first one did all the declarations, and the second one used the values, and could reset it. In ASP.Net so far I can't see how to relate them so this will work. This user control defines the properties:
5
2691
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hallo, I have a radiobuttonlist control that is added on a custom Web User Control. This control has a property that exposes the SelectedIndex property of the embedded radiobuttonlist. When running this in IE, behaviour is as I would expect it. If I select an item and do a postback, the page remembers my selection when reloading, and the SelectedIndex property of my control returns the correct value.
4
2492
by: =?Utf-8?B?UmljaEI=?= | last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I would like to dynamically add panes to the control with a form template added when the pane is added. I have tried unsuccessfully in creating the whole pane as a user control and have succeeded in adding the pane and then dynamically adding the content which is a user control to the pane, dynamically within the page. However I would like to have a single pane...
1
1898
by: tshad | last post by:
In VB 2008, I have a user control added to the page in the PageLoad event - but the properties are causing me an error. The program (TakeSurveyTest.aspx) using the control (ContactInfo): <%@ Page Language="VB" AutoEventWireup="true" Trace="true" CodeFile="TakeSurveyTest.aspx.vb" Inherits="TakeSurveyTest" %> .... <div visible="true" runat="server"> <asp:PlaceHolder ID="ContactInfo" runat="server"/<br />
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we値l explore What is ONU, What Is Router, ONU & Router痴 main usage, and What is the difference between ONU and Router. Let痴 take a closer look ! Part I. Meaning of...
0
10155
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8978
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project用lanning, coding, testing, and deployment謡ithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7502
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
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
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
3655
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.