You can write different methods to find the Dataset ID. This might be very useful to get the ID.
private void FindMethod()
{
string str="{ DatasetID = 13, DatasetName = Assigned Form Submission }";
int first = str.IndexOf("=") + "=".Length;
int last = str.LastIndexOf(",");
string str2 = str.Substring(first, last - first).Trim();
System.Console.WriteLine("DataSet ID: '{0}'", str2);
}