You need to pass a string value to catid, when you call
dispdata method.
Update: Hope you have corrected your code as follows
protected void btnsubmit_Click(object sender, ImageClickEventArgs e)
{
SqlCommand cmd = new SqlCommand();
con.Open();
string str = "update categorydetail set catname='" + txtcname.Text + "' where catdesc='" + txtcatdesc.Text + "'";
cmd = new SqlCommand(str, con);
cmd.ExecuteNonQuery();
Response.Redirect("CategoryDetail.aspx?Edit=Yes");
con.Close();
dispdata("ANY STRING VALUE");
}
Regards
Sebastian