4
Answers

TextBox and Repeater does not work when used together in C#

harish main

harish main

13y
3.6k
1
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
Answers (4)