Solved

Document repository solution in ASP.NET

Posted on 2007-03-22
11
1,149 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Automatic sizing of HTML.TextAreaFor based on content 1 26
Why is "packages element is not declared"? 2 132
SSRS ReportViewer report timeout 7 103
Angular JS Route 3 52
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now