Probably, you are getting the error here:
idlbl.Text = rd[0].ToString();
And the most likely reason is that there are no records which match your condition:
SqlCommand cmod = new SqlCommand("Select catageoryId from catageory where catageoryName='" + textBlock2.Text + "'", con);
So check that your textbox contains what you think it does, and that the DB does have at leats one row which matches. In fact, it's best to check this at run time as well:
SqlCommand cmod = new SqlCommand("Select catageoryId from catageory where catageoryName='" + textBlock2.Text + "'", con);
rd = cmod.ExecuteReader();
if (rd.Read())
{
idlbl.Text = rd[0].ToString();
...
But please, don't do it like that! Do not concatenate strings to build a SQL command. It leaves you wide open to accidental or deliberate SQL Injection attack which can destroy your entire database. Use Parametrized queries instead:
SqlCommand cmod = new SqlCommand("Select catageoryId from catageory where catageoryName=@CN", con);
cmod.Parameters.AddWithValue("@CN", textBlock2.Text);
rd = cmod.ExecuteReader();
if (rd.Read())
{
idlbl.Text = rd[0].ToString();