.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

XML File Format...

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :ASP.Net

XML structure:


i have try to made quiz application using xml file

Requirement of Quiz:
1)question id
3)answers (radio button or checkbox)
6)next question where to go...?

my xml flie : sample.xml

suppose start application:
 show question id:1
 Show question   :what is your name?
 Show answers RB :1)Jhon
show flags:
           flag depends on section of answer mode if select 3)Lina show flag :Manager

if select other answer thete is no flags .

note shows:
        Note also depend on answer selction mode if select 4)ron do not showw flag show only note: i will add position.        

if select other answer thete is no Note.

next question:
        next question is also depend on answer if selct answer 1)jhon then go to directly question no. 5

View Complete Post

More Related Resource Links

Inside Windows: An In-Depth Look into the Win32 Portable Executable File Format, Part 2


The Win32 Portable Executable File Format (PE) was designed to be a standard executable format for use on all versions of the operating systems on all supported processors. Since its introduction, the PE format has undergone incremental changes, and the introduction of 64-bit Windows has required a few more. Part 1 of this series presented an overview and covered RVAs, the data directory, and the headers. This month in Part 2 the various sections of the executable are explored. The discussion includes the exports section, export forwarding, binding, and delayloading. The debug directory, thread local storage, and the resources sections are also covered.

Matt Pietrek

MSDN Magazine March 2002

Inside Windows: An In-Depth Look into the Win32 Portable Executable File Format


A good understanding of the Portable Executable (PE) file format leads to a good understanding of the operating system. If you know what's in your DLLs and EXEs, you'll be a more knowledgeable programmer. This article, the first of a two-part series, looks at the changes to the PE format that have occurred over the last few years, along with an overview of the format itself. After this update, the author discusses how the PE format fits into applications written for .NET, PE file sections, RVAs, the DataDirectory, and the importing of functions. An appendix includes lists of the relevant image header structures and their descriptions.

Matt Pietrek

MSDN Magazine February 2002

Howto set the value of webgridcolumn.format in the class file?

About:  I want to define format string of the webgridcolumn by myself.Example:There is a ID column in a webgrid ,i want the cell of this column filled the data like "<a href="/Default/@ID">@ID</a>"Code: Microsoft.WebPages.Helpers.WebGrid mygrid = new Microsoft.WebPages.Helpers.WebGrid(tarobjs,canPage:Convert.ToBoolean(data.Groups["enablepager"].Value), rowsPerPage: Convert.ToInt32(data.Groups["pagesize"].Value));                 Microsoft.WebPages.Helpers.WebGridColumn[] columns = new Microsoft.WebPages.Helpers.WebGridColumn[data.Groups["col"].Captures.Count];                                 for (int i = 0; i < columns.Length; i++ )                 {                     columns[i] = mygrid.Column(columnName: data.Groups["col"].Captures[i].Value, header: data.Groups["headertitle"].Captures[i].Value);                                      }                 HtmlString myhtml = (HtmlString)mygrid.GetHtml(columns:colu

snp file retains format of default printer from which it was created

This seems to be the case: MS Access 2000/2003 generates a snp report via VBA (Windows 2000/XP is the general environment for the enterprise).  The report is emailed to another individual.  When the recipient tries to print the report the print options apparently force the print job into the printer's override tray as "Print to Heavy Paper"; thereby causing the printer to wait for a user to place paper into the override tray (the printer is in use by a number of users). This anomaly does not happen with snp reports sent from other users, only from the two who are using one particular printer as their default printer.  As this relates to a remote customer, I have not so far requested the [affecting] sender users try using a different printer.  Either way it causes someone to perform extra steps -- Sender: if the printer selection was to be changed each time a snp report is created; Recipient: each time they need to print the particular report they need to go into printer options and override the Heavy Paper issue by selecting letter paper (and always be alert that the particular report came from the two particular sender users -- whereas once the recipient user sends the print job, it's too late; they need to run over to the printer to insert paper into the override tray to avoid a backlog of printer jobs). The site's IS team has bee

Unable to export data to an excel file in grid format!!!

I'm exporting data to an excel sheet from the ojects list. The data is exporting to excel sheet well, but I'm unable to see the grid format for the data. The data is looking with out the rows and columns lines. I think I'm missing to set some property or somethnig ehwn exporting.   Any help would be really appriciated.

Format File


Dear buddies,

I need to create a format file for many of my tables in SQL Server.

My objective is to create a fixed length text file. 

Could someone please guide me.


I am reading through msdn's docs on format file but I couldn't grasp it. Can I use bcp to create this? I will have to repeat this for many more tables.


Please guide me.


Thanks in advance.

Load XML data (string format - not file) into a gridview




 I need some help help loading some XML tagged data I received as a reply from a Web Service (String format), into individual fields on the web form.


After spending some time,  I was able to load an XML file into a gridview using this code...

<?xml version="1.0" encoding="ISO-8859-1"?>
        <title>Empire Burlesque</title>
        <artist>Bob Dylan</artist>
        <title>Hide your heart</title>
        <artist>Bonnie Tyler</artist>
        <company>CBS Records</company>

Is there a way to export a datagrid to an Excel or html format file?

Hi all.. thanks for taking the time to help in advance!! :)

I've written a win application that has a datagrid which displays certain contents from a database, is there a way to allow the user to export the contents of that datagrid to maybe an excel file or html file so they can print it out themselves? I've done a lot of googling and most i could find were for web applications and not winform.. can someone point me in the right direction?

Thanks very much guys! :)

How to specify the Format of the file while using Microsoft.Jet.OLEDB.4.0


Private Function GetProcessingDate() As String

        ' Read a single value

        Dim sqlConn As OleDbConnection

        Dim sqlCmd As OleDbCommand

        Dim param As SqlParameter

        Dim strProcessingDate As String


            'Create a new connection object

            sqlConn = New OleDb.OleDbConnection(value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Trades;Extended Properties='text;Format=Delimited(|);HDR=YES'")


            'Create a new command object

sqlCmd = New OleDb.OleDbCommand("SELECT PROC_DT FROM trades.dat", sqlConn)


            With sqlCmd

                .CommandType = CommandType.Text


how to save data in XML file in pre specified format ?


Hello ,

i'm new to XML and 

i'm working on expert system to detect diseases 

and i want to store each disease symptoms in xml file but each disease has many symptoms so 

i want to store it as

<Disease Name >

<Concept = "something" Property="something" value="something">

<Concept = "something" Property="something" value="something">

<Concept = "something" Property="something" value="something">

</Disease Name>

i have tried to see some xml examples but they confused me :S


how can i save data in xml file with this format ?

and can i navigate XML file using XPathFile or there is something else ?

thanks in advance 





Kareem Naguib

File Connection with UTF-8 format lost some chars if source file encoding is ANSI


Hi folks

I have a situation where I need to read some UTF-8 files, but for some reason the system that is providing me the files is sending me mixed formats ( ANSI and UTF-8)

Researching on the situation, the system is converting the files automatically if they do not contains any unicode data.


The problem is that if the file is ANSI and it contains some extended ascii ( for example char 160 ) the dataflow is converting the ascii 160 to asci 63 and this is causing problems on database.


I am thinking this is because the ETL is expecting UTF format but insted receiving ANSI.

Is there any way to tell the SSIS to keep the extended ASCII ? 


Thanks in advance



SQL BULK INSERT, WITH FORMAT FILE and Hyperterminal file


Hello, I have a SQL Table, into which I am attempting to do a Bulk Insert With FormatFile.  I have SQL Server 2005, and a hyperterminal output from our phone system (PartnerMail).  I can't seem to get this to work ... Not Sure how to deal with the "Sometimes-there's-a-Double" time at the end ... And not sure of the 'MaxBytes' value (the second zero) ...

I keep getting one of two error messages, depending on what I mess with: 

Msg 8152, Level 16, State 14, Line 1

String or binary data would be truncated.

The statement has been terminated.


Msg 4832, Level 16, State 1, Line 1

Bulk load: An unexpected end of file was encountered in the data file.

Msg 7399, Level 16, State 1, Line 1

The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.

Msg 7330, Level 16, State 2, Line 1

Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".

Any suggestions?


SQL 2005, mainteance clean up task didn't delete a manual bak file with different format name, is i

I have a manual full backup, its name is in different format than scheduled dbname_date....bak, the clean up didn't delete it, is it normal?

SFTP is converting text file format, now SSIS sees an empty file


Using BIDS that came with SQL Server 2008 R2, I created a text file import package.  I used files generated from my local machine for local testing.  However, I find that these files get their format changed after being SFTP'd to the data warehouse.  Not being able to visually see a problem with the text file to be imported, I copied it down to my local machine and compared to one generated at my machine.  Not until I chose "Show All Characters" in Notepad++ did I see the difference: my local file ends its lines with a carriage return-linefeed character, whereas the file that went through SFTP ends its lines with a linefeed character only.

I suspect there's something very basic going on here that I don't know.  I won't ask anybody to explain it, but I'm wondering if there's some way I can import both file formats.  The column numbers and lengths are identical, it's the just line ending character that's different and causing zero rows to get imported.  The only other thing I know to do is recreate my flat file connection, and I haven't even tried that yet.


Export to a .tpf file (textwizard predefined format)


A tpf file is a "textwizard predefined format" which is a metadata description file from SPSS (the application SPSS).

The tpf file describes the columns and datatypes of the .dat file.

The SPSS site mentions it is a binary file, therefore I was curious whether someone has made a component which is able to generate a .tpf file on a given metadata inpit (so to say my query would deliver the datatypes, lenghts and so on, the component produces the accompanying .tpf file)

Business Intelligence professional

Problem in Date Format While Exporting To Excel Destination From Flat File Source In SSIS



I have a flat file(.csv) which contains data(strings incuding date in yyyy-mm-dd format).This i am using in Flat File Source and want to export those data to an Excel Destination.Before exporting to Excel Destination i have created a Derived Column component where i am using an express to get day,month,year part and creating a date sting in dd/mm/yyyy format then conveting it to DT_DATE datatype and then exporting to Excel Component.But while exporting to Excel this date format is getting changed to mm/dd/yyyy format.

The expression i used in derived column is

(DT_DATE)(SUBSTRING(date,9,2) + "/" + SUBSTRING(date,6,2) + "/" + SUBSTRING(date,1,4))

where date is a column from Flat File Source.

Even I changed the Locale to English(United Kingdom) in Flat File Connection Manager for the above .csv file.But still it didnt work.

I searched a lot in google and failed to get any solution on this.

Can anyone help me in solving this issue ?

File Splitter in .Net

I love to do utility programs in .Net. And this is one of them. As I was playing with JSplit (a free file splitter program), I wondered if I could do it in .Net. The framework supports file operations like reading files in bytes and creating them. It is indeed easy to do file operations in .Net Basics on File operations
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend