If you send the answer in the viewstate, it is easy for the quentionee to decript the answer from the page (you need some asp.net knowlage about viewstate.). Maybe you can use a server side cache for your answers or use the session.
Hitting the db is not really a issue, you probably do not have to many users to get a real load on your server. A requested question will be cached by the db server anyway for performance.
--
Peter
On Dec 11, 2007 9:05 PM, chris < chris.cudm ore gmail.com">chris.cudmore gmail.com> wrote:
On Dec 8, 3:49 pm, "Peter Groenewegen" < pgro... gmail.com">pgro... gmail.com
> wrote: ...
> In this case you can do some logic in the IsCorrect and make them all > propeties. However in the future you can change the IsCorrect to search for > a answer in a database of file. Then the best practice whould be a method.
>
I';m getting the entire question set for the page from the database at page load, including the answers. I don't want to hit the DB a second time if I don't have to.
--~--~- --------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "C# Community" group. To post to this group, send email to csharp googlegroups.com To unsubscribe from this group, send email to csharp-unsubscribe googlegroups.com For more options, visit this group at http://groups.google.com/group/csharp?hl=en -~----------~----~----~----~------~----~------~--~---
|