Potential place looks like:
int pgid = Convert.ToInt32(args[0]);
int pcid = Convert.ToInt32(args[1]);
int psdid = Convert.ToInt32(args[2]);
You are directly converting the strings into Int32. Make sure all of them are actually convertible to integer.
Couple of other observations:
1. I hope ProfileID is an integer as you used in comparison in if statement
2. Not sure why you converted the string array into integers and then back to string concatenation.
Instead of below:
string[] args = e.CommandArgument.ToString().Split(new char[] { ',' });
int pgid = Convert.ToInt32(args[0]);
int pcid = Convert.ToInt32(args[1]);
int psdid = Convert.ToInt32(args[2]);
Server.Transfer("product_title.aspx?pgid='" + pgid + "' & pcid='" + pcid + "'&psdid='" + psdid + "'");
it could have been done as:
string[] args = e.CommandArgument.ToString().Split(new char[] { ',' });
Server.Transfer("product_title.aspx?pgid='" + args[0] + "' & pcid='" + args[1] + "'&psdid='" + args[2] + "'");