473,553 Members | 2,930 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GridView, XML, and .NET 2005 Application

Hello, I'm in the processing of learning .NET 2005 and an trying to rewrite
a simple command line application that I wrote a couple years ago. I have
the following requirements:

1) Read an XML file that I create with a list of .EXE and .DLL files.

2) Scan a directory based on the path stored within the XML file and extract
the production version information

3) Add the Path, Filename and version information to a GridView control.
Now I have item #3 working today which displays output to screen using
console.write.

Question 1:

How can I add headers to a datagrid and update with my own information based
on me scanning a directory?

Question 2:

My application today reads the file path information, etc., from SQL Server
and then scans the directory for the version information. I would like to
instead use an XML file to contain this information instead of SQL Server.
This way I can use ClickOnce easily deploy my application without having a
SQL Server requirement. Most of my updates will be done to the XML file
only, so I would simply like to republish my ClickOnce to have user
redownload new XML file.

What is the best way for me to create an XML file of my data that can be
maintained? I have columsn such as:

1) Filename

2) Path of file

3) Description

4) Shortname of file

Each row within the XML will be unique. I need a way that I can easily
update/create this file. I currently have about 200 rows in SQL that I need
to get into my XML file. I really do not want to retype all the
information, but I can if I have to.

Any help or direction with this would be appreciated.

Nov 30 '05 #1
3 1120
You can save a DataSet as XML.

And something else you might want to think about. If the data displayed is
static, not requiring any user interaction, you might want to think about
optimizing your app by using an XSL transform to create the data in HTML in
the page, rather than a DataGrid. You can create an XSL style sheet, and use
an Xml WebControl to display it in any format you choose (as HTML).

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition

"dm1608" <dm****@spam.ne t> wrote in message
news:u3******** ******@tk2msftn gp13.phx.gbl...
Hello, I'm in the processing of learning .NET 2005 and an trying to
rewrite a simple command line application that I wrote a couple years ago.
I have the following requirements:

1) Read an XML file that I create with a list of .EXE and .DLL files.

2) Scan a directory based on the path stored within the XML file and
extract the production version information

3) Add the Path, Filename and version information to a GridView control.
Now I have item #3 working today which displays output to screen using
console.write.

Question 1:

How can I add headers to a datagrid and update with my own information
based on me scanning a directory?

Question 2:

My application today reads the file path information, etc., from SQL
Server and then scans the directory for the version information. I would
like to instead use an XML file to contain this information instead of SQL
Server. This way I can use ClickOnce easily deploy my application without
having a SQL Server requirement. Most of my updates will be done to the
XML file only, so I would simply like to republish my ClickOnce to have
user redownload new XML file.

What is the best way for me to create an XML file of my data that can be
maintained? I have columsn such as:

1) Filename

2) Path of file

3) Description

4) Shortname of file

Each row within the XML will be unique. I need a way that I can easily
update/create this file. I currently have about 200 rows in SQL that I
need to get into my XML file. I really do not want to retype all the
information, but I can if I have to.

Any help or direction with this would be appreciated.


Nov 30 '05 #2
Thanks for the reply, Keven.

I'm trying to do away with using SQL Server. If I use the SaveToXML option
of ADO.NET, is the XML file the is created something that can easily be
maintained going forward? I guess I cannot control the output or format of
the XML file, so that is why I'm thinking it may not be what I want.

Opinions?

"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
You can save a DataSet as XML.

And something else you might want to think about. If the data displayed is
static, not requiring any user interaction, you might want to think about
optimizing your app by using an XSL transform to create the data in HTML
in the page, rather than a DataGrid. You can create an XSL style sheet,
and use an Xml WebControl to display it in any format you choose (as
HTML).

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition

"dm1608" <dm****@spam.ne t> wrote in message
news:u3******** ******@tk2msftn gp13.phx.gbl...
Hello, I'm in the processing of learning .NET 2005 and an trying to
rewrite a simple command line application that I wrote a couple years
ago. I have the following requirements:

1) Read an XML file that I create with a list of .EXE and .DLL files.

2) Scan a directory based on the path stored within the XML file and
extract the production version information

3) Add the Path, Filename and version information to a GridView control.
Now I have item #3 working today which displays output to screen using
console.write.

Question 1:

How can I add headers to a datagrid and update with my own information
based on me scanning a directory?

Question 2:

My application today reads the file path information, etc., from SQL
Server and then scans the directory for the version information. I would
like to instead use an XML file to contain this information instead of
SQL Server. This way I can use ClickOnce easily deploy my application
without having a SQL Server requirement. Most of my updates will be done
to the XML file only, so I would simply like to republish my ClickOnce to
have user redownload new XML file.

What is the best way for me to create an XML file of my data that can be
maintained? I have columsn such as:

1) Filename

2) Path of file

3) Description

4) Shortname of file

Each row within the XML will be unique. I need a way that I can easily
update/create this file. I currently have about 200 rows in SQL that I
need to get into my XML file. I really do not want to retype all the
information, but I can if I have to.

Any help or direction with this would be appreciated.



Nov 30 '05 #3
I don't think it s a good idea to replace the database with an XML file. You
will loose all the benefits of concurrency control, backup/restore,
maintenance etc that the database provides you with.

You can store your XML in the database though either shredded (if it is
relational in nature) or natively...

Best regards
Michael

"dm1608" <dm****@spam.ne t> wrote in message
news:es******** ******@TK2MSFTN GP11.phx.gbl...
Thanks for the reply, Keven.

I'm trying to do away with using SQL Server. If I use the SaveToXML
option of ADO.NET, is the XML file the is created something that can
easily be maintained going forward? I guess I cannot control the output
or format of the XML file, so that is why I'm thinking it may not be what
I want.

Opinions?

"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
You can save a DataSet as XML.

And something else you might want to think about. If the data displayed
is static, not requiring any user interaction, you might want to think
about optimizing your app by using an XSL transform to create the data in
HTML in the page, rather than a DataGrid. You can create an XSL style
sheet, and use an Xml WebControl to display it in any format you choose
(as HTML).

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition

"dm1608" <dm****@spam.ne t> wrote in message
news:u3******** ******@tk2msftn gp13.phx.gbl...
Hello, I'm in the processing of learning .NET 2005 and an trying to
rewrite a simple command line application that I wrote a couple years
ago. I have the following requirements:

1) Read an XML file that I create with a list of .EXE and .DLL files.

2) Scan a directory based on the path stored within the XML file and
extract the production version information

3) Add the Path, Filename and version information to a GridView control.
Now I have item #3 working today which displays output to screen using
console.write.

Question 1:

How can I add headers to a datagrid and update with my own information
based on me scanning a directory?

Question 2:

My application today reads the file path information, etc., from SQL
Server and then scans the directory for the version information. I
would like to instead use an XML file to contain this information
instead of SQL Server. This way I can use ClickOnce easily deploy my
application without having a SQL Server requirement. Most of my updates
will be done to the XML file only, so I would simply like to republish
my ClickOnce to have user redownload new XML file.

What is the best way for me to create an XML file of my data that can be
maintained? I have columsn such as:

1) Filename

2) Path of file

3) Description

4) Shortname of file

Each row within the XML will be unique. I need a way that I can easily
update/create this file. I currently have about 200 rows in SQL that I
need to get into my XML file. I really do not want to retype all the
information, but I can if I have to.

Any help or direction with this would be appreciated.




Dec 15 '05 #4

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

Similar topics

3
6322
by: | last post by:
Hello, I have created an ASP.NET 2.0 application that utilized a Gridview Control to display and update/delete data. The problem I am having is that the gridview control is displaying the data correctly but it is not updating or deleting the rows. What I did was, in design view, added a gridview control and added an sqldatasource...
8
5021
by: Mike Kelly | last post by:
I've chosen to implement the "optimistic concurrency" model in my application. To assist in that, I've added a ROWVERSION (TIMESTAMP) column to my main tables. I read the value of the column in my select, remember it, and then use it in the update. It works just fine when I have full control of the whole process. I want to do the same for...
4
2611
by: Nalaka | last post by:
Hi, I have two questions about gridViews. 1. How can I intercept the row/column values at loading to change values? 2. After I update a row (using default update functionality), how can I re-format the updated row fields. I have looked at gridView.rowUpdated method, but cannot figure out how....
7
14790
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I want to look at that data and filter it based on what is in it. I know that this could have been done with data sets and data views in asp.net 1.1...
2
16327
by: | last post by:
Hello, I have a GridView in my ASP.NET 2.0 application that performs the paging feature perfect when I have it bound to a data source. But now I have it bound to a dataset and the paging feature will not work. When I try to use paging I get this error: The GridView 'gvResults' fired event PageIndexChanging which wasn't handled.
4
13478
by: Jim Katz | last post by:
I have an application that updates a strongly typed data set at run time. I'd like to dynamically create a table that connects to a run time data table. For displaying the data, this works well. I just set the GridView.DataSource once, and call DataBind(); I'd like to drive the application from the GridView control, by including command...
1
1452
by: dm1608 | last post by:
Hi all -- I'm rapidly learning ASP.NET 2.0 (never really did much .NET before... mainly an ASP and PHP guy until now) and seem to be having some technical challenges that I'm hoping someone can help me with. I've created an n-tier application that consists of a Business Access Lay and a Data Access Layer to query a SQL Server database. ...
0
2278
by: Aws | last post by:
My crazy GridView !! I am using Visual Studio 2005, I have a problem with my GridView. I have one access .mdb table and when I update a record on the table EVERYTHING is perfect. I made a Web Setup Project and installed My Web Application on my Localhost and it works perfectly. When I install My Web Application on our “Production...
5
2636
by: Randy Smith | last post by:
Hi ALL, I wonder if anyone has been using n-tier to bind to a GridView control by using the ObjectDataSource. This is our first OOP web application, and we have no tables. Right now we are simply working with objects in memory. So, it appears as though Microsoft requires that our datamapper classes reside inside a folder called...
1
6117
by: sheenaa | last post by:
Hello Members, I m creating my application forms in ASP.Net 2005 C# using the backend SQL Server 2005. What i have used on forms :: ? On my first form i have used some label,textboxs,dropdownlists,radiobutton and checkbox asp standard controls. On the click event of the command button the data gets stored into the...
0
7568
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7492
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8007
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7852
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5409
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5133
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3537
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3525
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1106
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.