473,486 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CodeDomSerializer

Hi,

I have written a custom web control with a DesignSerializer.
If i change a property in design-time, the serializer starts before the
properties will be set in the control (the object "value" in the serialize
method has the old property value). Thats annoying cause the serialize
should write somthing to the code that depends on the property.

Does anyone know a solution for my problem?

regards,
Björn Marthen
Nov 15 '05 #1
1 3094
Björn Marthen schrieb:
Hi,

I have written a custom web control with a DesignSerializer.
If i change a property in design-time, the serializer starts before the
properties will be set in the control (the object "value" in the serialize
method has the old property value). Thats annoying cause the serialize
should write somthing to the code that depends on the property.

Does anyone know a solution for my problem?

regards,
Björn Marthen

Hi Björn,

in the Method Serialize in your Serializer, the last parameter is your
control. you can access its properties and serialize values.

Public Overrides Function Serialize(ByVal manager As
System.ComponentModel.Design.Serialization.IDesign erSerializationManager,
ByVal value As Object) As Object

'ms-help://MS.VSCC.2003/MS.MSDNQTR.2003APR.1033/cpref/html/frlrfSystemComponentModelDesignSerializationCodeDo mSerializerClassTopic.htm
Dim BaseSerializer As CodeDomSerializer =
manager.GetSerializer(GetType(MyControl).BaseType,
GetType(CodeDomSerializer))
Dim codeObject As Object =
BaseSerializer.Serialize(manager, value)
Dim oMyControl As MyControl= CType(value, MyControl)
....
now you can serialize the code and use your control.

Nov 15 '05 #2

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

Similar topics

0
1356
by: Vimal | last post by:
Hello all, I am new to learning about the CodeDomSerializer Class. Can someone please help me with links to documentation or samples regarding using the SerializeResource method of the...
0
1001
by: Frank VDL | last post by:
Hi, I've created my own component that uses the CodeDomSerializer to generate some extra code in the "InitizializeComponent" Every thing seems to work fine, until I compile my app... Every...
1
2143
by: onyxring | last post by:
I've been building custom web controls in C# with VS2005. Currently I'm looking into adding design-time functionality and have reached a point where I need to generate code in the page the custom...
0
1383
by: onyxring | last post by:
I'm reposting this, because I had a bit of difficulty last time and think that it might have fallen through the cracks. If I'm posting to the wrong groups, please let me know. Surely someone has...
0
1038
by: onyxring | last post by:
I've been building custom web controls in C# with VS2005. Currently I'm looking into adding design-time functionality and have reached a point where I need to generate code in the page the custom...
0
1149
by: onyxring | last post by:
I've been building custom web controls in C# with VS2005. Currently I'm looking into adding design-time functionality and have reached a point where I need to generate code in the page the custom...
0
1363
by: Adam Right | last post by:
Hi, I am using contextmenustrip in my usercontrol in which there is a grid control associated with it. I added the rows below in the designer code, to create contextmenustrip with its...
1
2174
by: EvilProject | last post by:
Hi, I'm writing a custom codedomserializer for a control(using DesignerSerializer). It works great but i can only insert statements to the initializecompenet method. I want to create a methods in...
2
48893
by: pavanip | last post by:
Hi, I developed a windows application in Vb.Net 2003.It is working fine in this. But when I am trying to convert this into .Net 2005 I am getting this error. Class not registered...
2
1954
by: Mufasa | last post by:
I have a .Net 1.1 program that works fine that plays flash files. I am converting it to .Net 2.0 and am getting all kinds of compilation errors about not finding files or assemblies. Here's the...
0
7099
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
7123
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,...
0
7175
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...
1
6842
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...
1
4864
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...
0
3069
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...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
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 ...
0
262
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...

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.