Dataset and HTML

A

A-PK

Hi All,

I am writing a program with Datagrid bind to the dataset.
and the user allow to filter and do a criteria search on that datagrid.

so the Datagrid could be display any type of data anytime.( could be order
information, could be customer information or others - depend of what user
want)

my concern is that once the user sees the type of data in Datagrid, and they
want to export out and convert to HTML format. and save in computer for
reference purpose. what should I do that ?

i am able to convert to Excel, text file so far, but having problem with
HTML.

Could someone able to assist me on that part.

what I want is just simply one click button. then the Internet Explorer will
pop up, and the datagrid data will be shown in a HTML format file in
Internet Explorer. then the user can choose to save or not save the file.

Thank you very much
Regards
 
K

Kevin Spencer

A DataGrid IS HTML. And cross-posting is bad Netiquette.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
D

Dilip Krishnan

You could encapsulate the datagrid in a span and just copy the contents
of the span to the new window. Ideally I'd recommend having the data in
an XML form and then have stylesheets work with the data in different
formats
HTH
 
J

Jason Shohet

Kevin -- er-- MVP -- you like slamming people, but you are short on
solutions.
Is that what a 'MVP' is all about? Acting like a know-it-all and
criticizing anyone who's question you don't approve of. Give this guy a
decent answer boy.
And while you're at it boy, give me a decent answer on how an ascx control
can call a function on the parent that returns a value to the ascx control.
You accused me of not 'optimizing my time' because I didn't want to spend
an hour+ sifting thru MSDN to look for an answer, remember?

I wonder if you're the way you are because you're representing Microsoft....
:)
 
G

Guest

Pierce,
when the datagrid displays in the webpage, it is rendered as html. .NET
takes the serverside code and converts it to html and javascript. If the
user goes to 'File, Save' in the browser, the page with the datagrid can be
saved to a location on the computer. No 'export' function / code is
necessary. Later, the user can go back to it anytime and view it in IE --
try it.

Good luck
Jason Shohet
 
K

Kevin Spencer

I don't "like slamming people." And I certainly DON'T represent Microsoft. I
gave you the answer: A datagrid IS HTML in the client. Sorry if you're not
happy about that, but it is simply the truth. And I have answered your other
question as well. Take a look.

You missed my point about the other question as well. If you've spent 24
hours looking for an answer, you certainly have an hour to research your
issue on MSDN. In fact, the entire .Net SDK is a free download from
Microsoft. You can download it, install it onyour machine, and use it to
your heart's content. I use it every day, many times a day. Here's the URL,
so you don't have to look it up:

http://www.microsoft.com/downloads/...A6-3647-4070-9F41-A333C6B9181D&displaylang=en

Note that I didn't accuse you of anything in my replies. But you are
name-calling now. So, who's slamming whom? I didn't even mention the fact
that cross-posting is bad Netiquette. It would have helped you out if I had,
and if you had listened to me. Bad Netiquette will get you LESS help rather
than more. Offend enough people and you will find yourself out of a
resource.

How many people do YOU help a day?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
A

A-PK

hey Tom

then if i want to click one button and run the HTML file. that the HTML must
contain the lastest dataset that I just generated, then how should I do.
 
G

Guy Blanc

A-PK wrote:

what I want is just simply one click button. then the Internet Explorer
will pop up, and the datagrid data will be shown in a HTML format file in
Internet Explorer. then the user can choose to save or not save the file.

If you were using Linux, you wouldn't have to care about proprietary file
formats, and just export it to XML which can be read by Open Office Calc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top