Click here to Skip to main content
15,916,949 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to find multiple occurrence in a string. Pin
Spunky Coder22-Mar-09 23:34
Spunky Coder22-Mar-09 23:34 
AnswerRe: How to find multiple occurrence in a string. Pin
Luc Pattyn23-Mar-09 1:28
sitebuilderLuc Pattyn23-Mar-09 1:28 
AnswerRe: How to find multiple occurrence in a string. Pin
#realJSOP23-Mar-09 2:52
professional#realJSOP23-Mar-09 2:52 
AnswerRe: How to find multiple occurrence in a string. Pin
#realJSOP23-Mar-09 3:17
professional#realJSOP23-Mar-09 3:17 
QuestionNBIS biometric image software Pin
RogerLum22-Mar-09 22:32
RogerLum22-Mar-09 22:32 
AnswerRe: NBIS biometric image software Pin
Christian Graus22-Mar-09 23:14
protectorChristian Graus22-Mar-09 23:14 
GeneralRe: NBIS biometric image software Pin
Rajesh Anuhya23-Mar-09 1:55
professionalRajesh Anuhya23-Mar-09 1:55 
QuestionSerialize an Object with XmlSerializer Pin
Ido22-Mar-09 22:25
Ido22-Mar-09 22:25 
Hi all,
I have an object called “Report” that I want to serialize.
The saved object will be open at IE browser.
I want to save object from C# code with line at the head:
<?xml-stylesheet href="Report.xslt" type="text/xsl" ?>

How I do that?

I used with XmlSerializer from microsoft.
var serializer = new XmlSerializer(typeof(Report), NameSpace);
writer = new StreamWriter(fullpath));
serializer.Serialize(writer, this);


The result is :
<?xml version="1.0" encoding="utf-8" ?>
<Report xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/Report.xsd">
	<StartDateTimeTest>22-9-2009 12:00:12</StartDateTimeTest>.....


And i want to get
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="Report.xslt" type="text/xsl" ?>
<Report xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/Report.xsd">
	<StartDateTimeTest>22-9-2009 12:00:12</StartDateTimeTest>.....

I am very desperate,
Thanks all.
Ido

AnswerRe: Serialize an Object with XmlSerializer Pin
Spunky Coder22-Mar-09 22:43
Spunky Coder22-Mar-09 22:43 
GeneralRe: Serialize an Object with XmlSerializer Pin
Ido22-Mar-09 22:52
Ido22-Mar-09 22:52 
GeneralRe: Serialize an Object with XmlSerializer Pin
Spunky Coder22-Mar-09 23:07
Spunky Coder22-Mar-09 23:07 
QuestionHelp needed in finding control Pin
The Pod22-Mar-09 21:51
The Pod22-Mar-09 21:51 
AnswerRe: Help needed in finding control Pin
Mycroft Holmes22-Mar-09 22:38
professionalMycroft Holmes22-Mar-09 22:38 
QuestionGridview, databind retrieving value from database Pin
Julius8822-Mar-09 21:40
Julius8822-Mar-09 21:40 
AnswerRe: Gridview, databind retrieving value from database Pin
Mycroft Holmes22-Mar-09 22:43
professionalMycroft Holmes22-Mar-09 22:43 
GeneralRe: Gridview, databind retrieving value from database Pin
Julius8822-Mar-09 23:13
Julius8822-Mar-09 23:13 
Questiona href issue Pin
Julius8822-Mar-09 20:56
Julius8822-Mar-09 20:56 
AnswerRe: a href issue Pin
Ravi Mori22-Mar-09 21:16
Ravi Mori22-Mar-09 21:16 
AnswerRe: a href issue Pin
Christian Graus22-Mar-09 21:38
protectorChristian Graus22-Mar-09 21:38 
GeneralRe: a href issue Pin
Julius8822-Mar-09 23:15
Julius8822-Mar-09 23:15 
GeneralRe: a href issue Pin
benjymous22-Mar-09 23:35
benjymous22-Mar-09 23:35 
GeneralRe: a href issue Pin
Dave Kreskowiak23-Mar-09 3:50
mveDave Kreskowiak23-Mar-09 3:50 
QuestionHow to get the value of the existing cookie. Pin
Nekkantidivya22-Mar-09 19:42
Nekkantidivya22-Mar-09 19:42 
AnswerRe: How to get the value of the existing cookie. Pin
N a v a n e e t h22-Mar-09 20:01
N a v a n e e t h22-Mar-09 20:01 
Questionhelp on GUI foe Deploy Pin
varun.g22-Mar-09 19:29
varun.g22-Mar-09 19:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.