Solved

Document repository solution in ASP.NET

Posted on 2007-03-22
11
1,150 Views
Last Modified: 2008-03-17
Hi to all,
I'm developing a big activity tracking in C# ASP.NET (Web forms). There are workers that must do a work and after the job is done they must fill-in certain documents. The documents are uploaded in a folder on the ASP.NET server. What must happen is:

1. A worker opens a document ( the document is downloaded from the server to the client machine and opened on the client machine).
2. The worker fills-in some data in the document and then saves it (could be a WORD, EXCEL, or other document).
3. A great solution would be if this document is automatically uploaded back on the server in the moment in which the user clicks SAVE in (i.e. MS WORD), but I feel that is hardly possible.
4. Another possible solution is that when the worker saves the document ( on the client) and then the worker clicks an "UPLOAD DOCUMENT" button on the web page, the document is uploaded back to the server to its according location. (my problem is that I don't know how to find the changed (saved) document on the client machine in order to upload it back on the server. It is probably saved on same client temporary location, but I'm not sure).

So what I need is a document repostory solution that can fulfil the 4 points above.

Can you help me with one?

Greetz,
Pavel Tsekov
LogSys, Varna, Bulgaria
0
Comment
Question by:paul_tsekov
  • 5
  • 3
11 Comments
 
LVL 11

Expert Comment

by:ethoths
ID: 18769899
Have you considered using the office object model. This allows you to interact with office documents completey in code. You can create, edit, delete and save (and do anything else) wiith office diocuments in this way. What you could do is just collect the required info from the worker in a standard web form and then use the object model to create the document on the server.
0
 
LVL 1

Author Comment

by:paul_tsekov
ID: 18770083
Hi ethoths,
the idea is simple:
1. On the server there are already prepared sample documents (templates if you say),
2. The worker downloads a template (empty document).
3. The worker fills-in several fields.
4. the worker saves back (uploads) the filled-in document back on the server.

So collecting in a standard form is not an option at all...

Greetz,
Pavel
0
 
LVL 11

Expert Comment

by:ethoths
ID: 18770267
Why not? You send down an empty document, the worker supplies information and you get back the empty document (which you already have) plus the info that the worker entered. All I'm suggesting is that you don't send the document down and back again. The form you use to collect the information could "look" like the original document, just use form fields where the worker enters the information.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 1

Author Comment

by:paul_tsekov
ID: 18770508
Hi ethoths,
I need a solution for any kind of document (WORD, EXCEL, etc...).

The idea is that templates are not known.
(i.e. the project manager of the workers perpared a word document with a table in it and several fields to be filled in,). It should be possible for workers to download that document, fill-in fields and then send back the filled-in document - maybe using a different name.

So your solution is nice, but only we (the developers) know all possible fields for all template documents. Unfortunately we cannot know them...

Greetz,
Pavel
0
 
LVL 11

Expert Comment

by:ethoths
ID: 18770863
In that case I think you should consider setting up a share point website. The main purpose of sharepoint is to share and control documents in this manner. The sorkers can access the documents either by browsing the site or can be notified by email (with the document as an attachment). They can then save the document (to have it uploaded) or simply reply to the email with the document as an attachment.
0
 
LVL 1

Author Comment

by:paul_tsekov
ID: 18771099
Hi ethoths,

I agree that sharepoint is a good solution in many cases as it does what I need, but the problem is that I have a certain web application, for a work to be completed I have i.e. 4 documents to be completed by workers.

Table WORK:
WORK_ID
WORK_NAME...


Table DOCUMENT:
DOCUMENT_ID
WORK_ID (Foreign key)
FILE_NAME - > file name for the document in a folder on the server.

I have a page: WORKDETAIL.aspx

consisting of:
Work infomation panel in the upper part of the page
Documents grid in the lower part of the page.

When the user selects a document from the grid, the DOCUMENTDETAIL page is opened:
in that page we have a panel with information about the document.

There are 2 buttons :
OPEN and SAVE

The idea is : the worker clicks OPEN -> and so the document opens in its according application (WORD - > in case the document is a .DOC, Excel - > in case the document is .XLS, etc...) (This is handled by Windows).

Then the worker changed some data in the document via MS Word and saves it.

What I need is to find this SAVED COPY of the document on the client machine and then when the user clicks SAVE button, the document will upload back on the server.

I don't think a Sharepoint solution is simple enough for my needs. I just need a simple component....

Greetz,
Pavel


0
 
LVL 11

Accepted Solution

by:
ethoths earned 500 total points
ID: 18771243
The problem is that you cannot write ANY code in js that can access the file system automatically. For example the text box on the File control is read only. The only way I can see is for tyou to email it back or use an ActiveX control to post it back. A common file upload control is AspUpload...

http://www.aspupload.com/

If you know the users and they know you then trusting a downloaded ActiveX should not be a problem.
0
 
LVL 11

Expert Comment

by:ethoths
ID: 19070885
I put a lot ofd effort into thei sone and beleive that the question was properly covered by my answers.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question