Hi
In below line i am getting error
List Result = bALSessionRatingParameter.GetSessionRatingParameter(Convert.ToInt32(hf));
C#
protected void lnkSelect_Click(object sender, EventArgs e)
{
var repeaterItem = ((Control)sender).NamingContainer;
HiddenField hf = (HiddenField)repeaterItem.FindControl("hdfId");
BALSessionRatingParameter bALSessionRatingParameter = new BALSessionRatingParameter();
List Result = bALSessionRatingParameter.GetSessionRatingParameter(Convert.ToInt32(hf));
rptRating.DataSource = Result;
rptRating.DataBind();
}Thanks

Uttam KumarRank #1,076 · 1.8K reputationPosted Apr 18, 2022, 1:19 AM EDT
Muhammad Imran AnsariRank #326 · 7.6K reputationPosted Apr 17, 2022, 1:03 PM EDT
You are casting HiddenField into integer which is throwing exception. Use the value of hidden field like:
List Result = bALSessionRatingParameter.GetSessionRatingParameter(Convert.ToInt32(hf.Value));