Hello Crpietschmann,
I've also found another thread "Mixed Mode (Forms & Windows)
Authentication" in the asp.net security newsgroup and have also posted some
suggestion here.
Regarding on the question you mentioned in this thread here are some of my
understanding and ideas:
As you said, the page will display multiple Questions and each of which
contains multiple answer items, I think your decision on using nested
template databound control is reasonable. However, instead of using
GridView + GridView, I suggest you use Repeater + GridView(nested) because
GridView is a very expensive one comparing to repeater (on performance
consideration). If the inner answer list of each Question do not need to
display multiple columns, you can even consider use DataList instead of
GridView.
So I think the better combination is repeater + DataList. Each question
displayed through repeater items and use a DataList for displaying sub
answer items. Datalist also support Edit,Update, Delete, insert events ....
Display each main Question in repeater item is easy, the problem here is
displaying the answer items through DataList or GridView in each
RepeaterItem. Since you said that the answer list of each question support
insert/edit/update, I'm wondering how the data will persisted in the
database, this will impact how we will implement our code logic to
manpulate the data associated with the DataList control in each Question
Item(repeater item).
For example, if in the database, you have a main table storing all the
questions and another sub table which store answer items and each anwser
item use a question ID to associate with its main question, then in our
ASP.NET page, we could consider the following means to display and
manipulate question data:
** use ADO.NET dataadapter or table adapter to query both the main
table(questios) and sub table(answer items) as two DataTables and save them
into Application's Cache storage since we'll manipulate them later.
** At page's first request, databind repeater through the main questions
table and in each repeater item, you can use the "Repeater.ItemDataBound"
event to get the sub answer list from Sub DataTable and bind the items to
the nested DataList/GridView.
** When user perform insert, update, delete ... operation on the nested
DataList/GridView control, we need to update the certain anwser record's
value in the cached datatable(sub table).
** when the user want to save all the setting, just update the two cached
datatable into backend database....
The above steps is a general description. It would be helpful, if you can
provide me the detailed database structure and a screenshot of a prototype
page which demonstrate how the questions and answers will display and let
user to manipulate them. Thus, we can try looking into it further.
If you have any question, please feel free to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.