DataList binding problem

A

AleXmanFree

Hi, I have this kind of problem,

In my asp.net page i use DataList and user control that is repeated in
DataList.
This user control has in it a checkbox , so everytime user clicks on
checkbox it goes postback.
But i cretaed new public static event in my user control class and
binding to this event function in my Page (that has in it user control
) and everytime when checkbox checked i call event that itself calls
method in Page class. also there are Lables in my user control that get
their values at Page_Load and bindet to Table.
The problem is in following,
WHEN checkboxes' event called (that is in Page class) and i do my
modifications in my table that is binded to DataList (to see changes
after user has checked a checkbox) the changed values are not seen
after page returns to user, the value is still the old one, despite i
didnt forget to call myDataList.DataBind(), and this.DataBind().
But After Refresh (actually after the next postback) the real editied
values already binded to DataList and controls got them
successfully.... This happen because of after checkbox function is
finished in Page class, the Page_Load is not called once again , as it
is calling before Event click. why myDataList.DataBind() doesnt help
here?
Please let me some Ideas if you guess my problem...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top