[This is abuse! Why did you put it as an answer? Worse, why did you accepted it formally? Please, un-accept it, to avoid reporting for cheating. — SA]
it was fine but i need to pass those arguments in page redirect
if (e.CommandName == "Edit")
{
string[] commandArgs =e.CommandArgument.ToString().Split(new char[] { ',' });
string deptid = commandArgs[0];
string classname = commandArgs[1];
string sem = commandArgs[2];
Response.Redirect("AddSubjects.aspx?Deptid=" + deptid + "?classid=" + classname + "?Sem=" + sem + "");
}
This is my code but its nt work