|
This sounds messy to me. If I check an item, it disappears from the list ? I would have thought you would allow users to request a document they have viewed before, and that you'd track what they read automatically, through what documents they requested from your system.
I would expect you're going to store in the DB which ones were marked read, then run SQL to request the unread ones to view.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian,
Thanks for your quick reply. You bring up a good point, I see that I probably did not clarify this as well as I should.
The list of documents that need to be read is a separate page that serves as a central location to store all those documents that still need to be confirmed as being read (by the user). This list contains the name of the document, a link to the document and checkbox that is to be checked once the document is read. The documents are located on a variety of pages throughout the site.
Hopefully that helps. Sorry for the initial confusion.
Allison
|
|
|
|
|
OK - I still think that you should be detecting when a document is requested, and marking it as read as a result, and letting the user view ALL documents in order to select which ones to mark as read ( so they can unmark some ). From there, if you have them marked as read in the DB, it's easy to write SQL that returns the list of unread documents, so you can display that.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian,
Thanks that makes perfect sense, however (per the requirements provided to me), I need for the user to actually check a box or something to confirm that they have read the document. I really appreciate your help.
Allison
|
|
|
|
|
Has anyone gone over the requirements with the client, or are they allowed to invent anything and you're not allowed to offer feedback ?
In any case, you can do this easy enough, just define a column that has a checkbox in a gridview that you display, then check which ones were checked, on postback.
http://www.codeproject.com/info/search.aspx?artkw=gridview+checkbox[^]
There seems to be a lot of CP articles on how to use checkboxes inside a gridview, I'd say you need to start there. It's a while since I've done this sort of thing, and I am sure that an article with downloadable code will help you more than any comments I might make in a forum reply.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian,
This is an in-house project and the criteria has already been determined and laid out beforehand.
Thanks again for your quick reply and your help, I really appreciate it. I will check out the information that you provided.
Allison
|
|
|
|
|
Hi Allison,
ahayw01 wrote: I have a check box before each url. The user will need to check off which documents he/she has read and then submit the page.
This is not a good idea in my opinion. Document will be still shown in the documents to read area when user reads the documents and not check off the check box. Automating this would be a nice idea. You can make use of a Http handler and hook one for PDF extension. You only need to show the PDF link to the user without any check box. When user clicks on a PDF file link, this handler will be executed and it will do the logging.
ahayw01 wrote: I can store the document list in a sql database but I am not certain how to maintain the log of documents for each user and how to only display the list of those documents that have not yet been read.
You may need two tables. One for storing the available documents and one for logging the users read activities. Here is a sample.
Master table - Documents<br />
- DocumentId - A unique id to identify each document<br />
- DisplayName - Text displayed to user<br />
- PDFFileName - PDF file name<br />
<br />
Transaction table - UserReadActivity<br />
- UserId<br />
- DocumentId - Foreign key referring Documents table<br />
You can easily get all the documents that a user has to read by using the query
SELECT *
FROM Documents
WHERE DocumentId Not IN (SELECT DocumentId FROM UserReadActivity WHERE UserId = YourUserId); It will be good to show the documents that are already read if user is allowed to reread. It can be achieved by joining the both tables.
Hope that helps.
|
|
|
|
|
Navaneeth,
Thanks for your response. The solution that you proposed is great and automating this makes perfect sense. Unfortunately, I need to be able display the list of documents that need to be read and have the user check the box, confirming that he/she has read the document.
I am sure I will be able to use what you proposed in my future projects.
Thanks again,
Allison
|
|
|
|
|
Create a log table that has it's keys setup to be the userid and the documentid. When they click on the submit button, loop through the checkboxes and add a value (check for duplicates) into this log table. Then, just run a simple query joining your document table with the log table to get those records that have not been viewed.
This is pretty basic coding, so if this is above your head go to the library and get a decent book, there will be many examples on this type of question.
|
|
|
|
|
Hello,
Thank you for your response. Setting up the log table as you suggested makes perfect sense. This seems very feasible and not over my head, so thanks again.
Allison
|
|
|
|
|
Hi everyone,
m trying to understand design patterns .. which one to use when .. most popular ones .. most used in normal projects .. and some good examples ... im tired of vegetables and doctor examples ..
any help would be appreciated
and preferably with code Big Grin
I am also in need of a big project where I can see all the things working together .. that will help a lot in understanding .. if any one can share .. that would be a great help
Thanks
Vishwjeet
|
|
|
|
|
No-one is going to mail you a 'big project'. Your best bet for what you want is to look through the articles here on code project, or perhaps stuff like dot net nuke.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
a small one will do .. but i need some insight on .. what are the most popular design patterns being used for some typical applications nowadays.
like an application for having a custom form for data entry
then reporting using rdlc or maybe a gridview
then having data modification forms .. a very normal application .. but with crucial data
the tutorials on net just tell me what a design pattern is and how to use it
|
|
|
|
|
i am trying to create an application using ModalPopupExtender.But getting a run time error - 'Microsoft JScript runtime error: 'AjaxControlToolkit' is undefined'.
I am using VS 2008,.net 3.5 .Help me to solve this.
|
|
|
|
|
What do YOU think this error may mean ? What have you done to try to make sure you DON'T get this error ? Do you have the AJAX toolkit installed ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
yes I have installed Ajax toolkit.actually I downloaded a program and did exactly the same but still getting the above error.The program works fine in VS 2005.Later I changed to VS 2008[but my program was created in VS 2005] and downloaded the ajaxtoolkit for .net 3.5.Then got this error.
|
|
|
|
|
Hi all,
Is it possible to change the formview mode from insert to readonly or from readonly to insert from Raisecallbackevent(asynchronous postback] in asp.net!!!
with __doPostback event of hidden button, I am able to do it. But I want to do this asynchronously. Please help
|
|
|
|
|
Just put a transparent div over all the controls.
When callback is raised and the control comes to the client side javascript,
create an absolute position div with opacity set to almost 0. Stretch it to the whole screen.
The page will look like readonly.
|
|
|
|
|
with formview div layers does not help. The insert template has to be loaded when we are changing to insert mode. How do I make the Raisecallback event to load formview in different modes?
I have this formview inside a usercontrol with gridview. and the parent page has other controls which should be editable.
|
|
|
|
|
Actually ,my requirement is ,there is a tree view having context menu.By whcih We can add new node,delete and edit nodes.When user select Add new ,then a window should open,having textbox and add button.by which we can enter name of new node and add it.
I got context menu having Add,edit,delete option and when user select add new a window does open having textbox and add button.Problem is that i want to enter that new node as a child node of selected node in to databse.For this i require name of selected node.i want to get node name and context menu on right click on tree view parelally.
|
|
|
|
|
use event.srcElement to get the element where it is clicked. The pass through querystring in window.open .
|
|
|
|
|
I am tryin to add the AJAX toolkit, so I have downloaded the toolkit from asp.net website for MVS2005, When I am attempting to add the .dll file or want to sample files then a error mesage
as bellows " could not load file or assembly Sytm.wb.extension,version =1.0.61025.0,culture=neutrl,publickeytoken=31bf3856ad364e35 or one of its dependencies. the sytem can not find the specified"
If you give me answer then I will be highly oblige.
Thanking you
Prakash Halder
|
|
|
|
|
Is the .NET Framework v 1.0 installed on the system? The execption message tells you what the problem is.
only two letters away from being an asset
|
|
|
|
|
You need to install ASP.NET AJAX server extensions. This will add necessary assemblies to GAC.
|
|
|
|
|
Hi all,
I have set a breakpoint in the page_Load event of the Statrtup page of the website.But is is not hitting while runnong the project.What may the reason,Can anybody suggest me the reason and how can i solve it.
THank in advance.
|
|
|
|