I was using Repeater in c# and it was able to display all the data, recently i added Multiline TextBox and after that the Repeater value is not getting displayed. But if i comment TextBoxLogInfo then the Repeater display all the data.
Is there way to show data for both same time.
Code in c#
------------
SqlDataReader sdr = cmd.ExecuteReader();
while (sdr.Read())
{
//Assign to your textbox here
TextBoxLogInfo.Text = sdr["LOG_DETAILS"].ToString();
}
//DataBinding Repeater
Repeater1.DataSource = sdr;
Repeater1.DataBind();
Your help will be highly appreciated
Thanks
Loading
Soft CornerPosted Mar 15, 2011, 2:45 AM
You are Facing this problem bcz in your code there is only one DataReader sdr, once all data read at one stage the other control couldnt find the data.
so, after while loop close your DataReader i.e sdr.Close() & Execute the same datareader.
sdr = cmd.ExecuteReader();
//DataBinding Repeater
Repeater1.DataSource = sdr;
Repeater1.DataBind();
Hope this will help you.
harish mainPosted Mar 18, 2011, 4:08 PM
Suthish NairPosted Mar 16, 2011, 2:54 PM
Is this a duplicate post?
hamida khanamPosted Mar 15, 2011, 4:02 AM
I was facing the same problem but after acting on your advise i got the solution.This is the solution of the problem.Thanks for helping.