A
Artem Ploujnikov
Hello everyone
Suppose I have a user control whose sole purpose is to edit records from a
specific data set... It has the ability to edit multiple tables at the same
time, and it might contain more than one ObjectDataSource and a few
data-bound controls. A good example of such a control is a control that
edits and/or displays multiple-choice questions.
What's the best way to pass the ID of the record being edited to that type
of control? Here's what I can think of
Option 1:
Declare a public property named QuestionId in the control and have it
programmatically set one of the parameters of the DataSource.
Option 2:
Read it directly from the session or the query string
Option 3:
Create a data-bound control and set everything up programmatically (this is
not very designer-friendly)
Are there any other options I didn't even consider?
Thank you,
Artem.
Suppose I have a user control whose sole purpose is to edit records from a
specific data set... It has the ability to edit multiple tables at the same
time, and it might contain more than one ObjectDataSource and a few
data-bound controls. A good example of such a control is a control that
edits and/or displays multiple-choice questions.
What's the best way to pass the ID of the record being edited to that type
of control? Here's what I can think of
Option 1:
Declare a public property named QuestionId in the control and have it
programmatically set one of the parameters of the DataSource.
Option 2:
Read it directly from the session or the query string
Option 3:
Create a data-bound control and set everything up programmatically (this is
not very designer-friendly)
Are there any other options I didn't even consider?
Thank you,
Artem.