Hi
I have below code but it is showing System.Web.UI.WebControls.Literal in Student Name
protected void lnkUpdateStatus_Click(object sender, EventArgs e)
{
try
{
RepeaterItem ritem = (RepeaterItem)((LinkButton)sender).NamingContainer;
txtStudentName.Text = Convert.ToString(ritem.FindControl("ltrlStudentName") as Literal);
}
catch (Exception ex)
{
Utility.SaveErrorLog(ex.Message, System.IO.Path.GetFileName(Request.Path), System.Reflection.MethodBase.GetCurrentMethod().Name, Convert.ToInt32(hdfLogisticsManagerID.Value));
ShowMessage("Oops...", ex.Message, "error");
}
}
Rajanikant HawaldarPosted Oct 14, 2022, 7:15 AM
debug to understand what is the correct field to read the text from? just saying, it seems like you are converting the control object to string and assigning it to the txtStudentName.Text property. You should probably be accessing some kind of property on your control