473,397 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Serializing PageSettings

Good day...

I'm part of a group that is developing an app and my current task is
to set and store PageSettings for our documents. I am hoping to
utilize our architecture in storing PageSettings information in our
model schema. Our schema heavily utilizes the serialization of
the .Net framework.

In my developing, I'm able to add properties/attributes to classes and
have the data stored into this serialization process. In my
documentation class, I've added a PageSettings attribute which i want
to capture margin settings and such. When I add the pagesetting
attribute and try to save, I get an "InvalidCaseException: Specified
cast is not valid" during the serialization of the PageSettings.

My question now, is what I'm trying to do possible? I've been
searching the Internet for any hints/suggestions to my issue. I
appreciate any/all replies to this post.

thank you in advance.

Lawrence Tsosie
Stratford, CT USA
Sep 3 '08 #1
1 2086
"Lorentz" <la************@gmail.comwrote in message
news:9b**********************************@q26g2000 prq.googlegroups.com...
Good day...

I'm part of a group that is developing an app and my current task is
to set and store PageSettings for our documents. I am hoping to
utilize our architecture in storing PageSettings information in our
model schema. Our schema heavily utilizes the serialization of
the .Net framework.

In my developing, I'm able to add properties/attributes to classes and
have the data stored into this serialization process. In my
documentation class, I've added a PageSettings attribute which i want
to capture margin settings and such. When I add the pagesetting
attribute and try to save, I get an "InvalidCaseException: Specified
cast is not valid" during the serialization of the PageSettings.

My question now, is what I'm trying to do possible? I've been
searching the Internet for any hints/suggestions to my issue. I
appreciate any/all replies to this post.
Your description is too vague to say anything useful. We don't know what
kind of serialization you're using (binary? XML? DataContract?). Though the
kind of exception you're getting is unlikely to be thrown by any of the
stock serializers.

Try posting the code snippet where the exception is thrown, with some
surrounding context.
Sep 4 '08 #2

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

Similar topics

1
by: Ivo Bronsveld | last post by:
All, I have quite a challenging task ahead of me. I need to write an object model (for code access) based on a schema, which cannot be made into a dataset because of it's complexity. So I...
10
by: copx | last post by:
I want to save a struct to disk.... as plain text. At the moment I do it with a function that just writes the data using fprintf. I mean like this: fprintf(fp, "%d %d", my_struct.a, my_struct.b)...
1
by: Chris | last post by:
I'm having trouble Serializing a System.Data.DataColumn object. When I try to serialize it, I get the following: System.NotSupportedException: Cannot serialize member...
2
by: Tobias Zimmergren | last post by:
Hi, just wondering what serializing really is, and howto use it? Thanks. Tobias __________________________________________________________________ Tobias ICQ#: 55986339 Current ICQ status: +...
4
by: Jason Shohet | last post by:
We are thinking of serializing an object & passing it toseveral functions on web service. This will happen about 35 times as the page loads. The class has about 20 attributes. We're not sure...
1
by: Ed Sutton | last post by:
My C# app. apparently has problems with PageSettings not being initialized properly after calling PageSetupDialog. If a user selects a non-default printer from PageSetupDialog, the PageSize is...
0
by: smckibben01 | last post by:
I am trying to change the papersize with the following commands and it tells me the Kind must be set to custom as shown in the title but it is a read only property. How do I have custom page sizes...
0
by: Jorge | last post by:
Hello, I'm having an issue. Well... my PageSettings.HardMarginX and HardMarginY have an offset of about 5 (inchess / 100), both of them. When i print a string on a paper, i get it at exactly...
5
by: Garima12 | last post by:
user is selecting from combobox either portrait or landscape for printing the page. I am writing following code to set it. it is not working. In preview it shows portrait in both cases. If...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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...
0
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...
0
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—planning, coding, testing,...
0
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...

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.