Hi
In below line i am getting error
List Result = bALSessionRatingParameter.GetSessionRatingParameter(Convert.ToInt32(hf));
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 KumarPosted Apr 18, 2022, 5:19 AM
Muhammad Imran AnsariPosted Apr 17, 2022, 5:03 PM
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));