hai
pls specify which line u get error ? bcz u have Add word in If part and also in Else part.pls check strID and Page field data type in ur database,is it nvarchar or integer,bcz u mention as strId and pages as string,what u get in this 2 fields ? any numbers or string ?
If it is integer in ur database then change as follows
cmd = new SqlCommand("Update Role1 Set Add ='" + status + "' where ID= " + strID + " and Pages= " + Pages + "", con);
or try like this
cmd = new SqlCommand("Update Role1 Set [Add] ='" + status + "' where ID= '" + strID + "' and Pages= '" + Pages + "'", con);
Give square bracket for [Add] column name,bcz Add,New,Date ect are predefined word in visual studio,u cant use same as a variable.
Try to change "Add" field name to any other name or give square bracket,best u rename Add to added or adding like this