Click here to Skip to main content
15,889,808 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionCould not load file or assembly ... [SOLVED] Pin
V.18-Jan-12 2:28
professionalV.18-Jan-12 2:28 
QuestionNeed solution to synchronize Ms Access and SQL Server (Express Edition) database. Pin
Shah Rizal17-Jan-12 22:20
Shah Rizal17-Jan-12 22:20 
AnswerRe: Need solution to synchronize Ms Access and SQL Server (Express Edition) database. Pin
Shah Rizal18-Jan-12 20:07
Shah Rizal18-Jan-12 20:07 
QuestionASP .NET + ReportViewer + ObjectDataSource (LINQ To SQL) Pin
Matt U.17-Jan-12 3:02
Matt U.17-Jan-12 3:02 
AnswerRe: ASP .NET + ReportViewer + ObjectDataSource (LINQ To SQL) Pin
David C# Hobbyist.17-Jan-12 14:50
professionalDavid C# Hobbyist.17-Jan-12 14:50 
Questionhow can i get server value from *.js? Pin
buffering8316-Jan-12 22:57
buffering8316-Jan-12 22:57 
AnswerRe: how can i get server value from *.js? Pin
Dineshshp19-Jan-12 0:14
professionalDineshshp19-Jan-12 0:14 
Questiongenerate custom xml from a dynamic dataset Pin
nilarya16-Jan-12 21:22
nilarya16-Jan-12 21:22 
Hi All,

I dont know if this question is for this forum or I should post it on XML forum. I will transfer the question if you think it is more suitable on that forum.

However, I have a asp.net application in C# where I have a dataset which I can transfer to xml by using the following simple codeblock

C#
string result;
            using (StringWriter sw = new StringWriter())
            {
                ds.WriteXml(sw);
                result = sw.ToString();
            }


It generates the default xml of the table structure like the following:

HTML
<NewDataSet>
  <ImageInfo>
    <ImageID>1</ImageID>
    <ImageName>untitled.bmp</ImageName>
    <ImagePath>Some Path</ImagePath>
    <Width>800</Width>
    <Height>190</Height>
    <TileSize>256</TileSize>
    <Overlap>1</Overlap>
    <MimeType>image/jpeg</MimeType>
    <Scale />
    </ImageInfo>
</NewDataSet>


But I want the xml to be generated in the following format

HTML
<data>
<Columns>
<Column Name= "ImageID"/>
<Column Name= "ImageName"/>
<Column Name= "ImagePath"/>
<Column Name= "Width"/>
<Column Name= "Height"/>
<Column Name= "TileSize"/>
<Column Name= "Overlap"/>
<Column Name= "MimeType"/>
<Column Name= "Scale"/>
</Columns>
<Rows>
<Row>
<Cell>1</Cell>
<Cell>untitled.bmp</Cell>
<Cell>Some Path</Cell>
<Cell>800</Cell>
<Cell>190</Cell>
<Cell>256</Cell>
<Cell>1</Cell>
<Cell>image/jpeg</Cell>
<Cell></Cell>
</Row>
</Rows>
</data>


this is an example with dataset having one row. there are various rows in a dataset. In my application, I wont be knowing the structure of the dataset beforehand. i.e. there can be a resulting dataset where I have more columns than the one described in the example. How should I go about this? Any help would be much appreciated.

Thanks.
Questionasp.net 4.0: Using jQuery in place of UpdatePanels? Pin
Goalie3516-Jan-12 5:21
Goalie3516-Jan-12 5:21 
AnswerRe: asp.net 4.0: Using jQuery in place of UpdatePanels? Pin
Not Active16-Jan-12 7:38
mentorNot Active16-Jan-12 7:38 
AnswerRe: asp.net 4.0: Using jQuery in place of UpdatePanels? Pin
jkirkerx16-Jan-12 12:23
professionaljkirkerx16-Jan-12 12:23 
GeneralRe: asp.net 4.0: Using jQuery in place of UpdatePanels? Pin
Goalie3518-Jan-12 17:43
Goalie3518-Jan-12 17:43 
GeneralDynamic Menu in ASP.net Pin
naijeru16-Jan-12 0:57
naijeru16-Jan-12 0:57 
AnswerRe: Dynamic Menu in ASP.net Pin
thatraja16-Jan-12 1:37
professionalthatraja16-Jan-12 1:37 
QuestionFile name contains garbled or special characters when download. Pin
Satish_S15-Jan-12 19:37
Satish_S15-Jan-12 19:37 
QuestionFile or assembly name CrystalKeyCodeLib, or one of its dependencies, was not found. Pin
Shah Rizal15-Jan-12 16:31
Shah Rizal15-Jan-12 16:31 
AnswerRe: File or assembly name CrystalKeyCodeLib, or one of its dependencies, was not found. Pin
thatraja16-Jan-12 1:45
professionalthatraja16-Jan-12 1:45 
GeneralRe: File or assembly name CrystalKeyCodeLib, or one of its dependencies, was not found. Pin
Shah Rizal16-Jan-12 15:46
Shah Rizal16-Jan-12 15:46 
GeneralRe: File or assembly name CrystalKeyCodeLib, or one of its dependencies, was not found. Pin
thatraja16-Jan-12 17:56
professionalthatraja16-Jan-12 17:56 
GeneralRe: File or assembly name CrystalKeyCodeLib, or one of its dependencies, was not found. Pin
Shah Rizal17-Jan-12 22:11
Shah Rizal17-Jan-12 22:11 
Questionmobile AMF Pin
Rajeev_8715-Jan-12 5:52
Rajeev_8715-Jan-12 5:52 
QuestionIFrame padding Pin
Ali Al Omairi(Abu AlHassan)15-Jan-12 5:00
professionalAli Al Omairi(Abu AlHassan)15-Jan-12 5:00 
AnswerRe: IFrame padding Pin
Not Active15-Jan-12 7:23
mentorNot Active15-Jan-12 7:23 
GeneralRe: IFrame padding Pin
Ali Al Omairi(Abu AlHassan)16-Jan-12 3:35
professionalAli Al Omairi(Abu AlHassan)16-Jan-12 3:35 
AnswerRe: IFrame padding Pin
spkichara16-Jan-12 21:24
spkichara16-Jan-12 21:24 

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.