targetLocator.Frame(locator["index=".Length..]); replace with targetLocator.Frame(Int32.Parse(locator["index=".Length..]));
targetLocator.Frame(locator["index=".Length..]);
replace with
targetLocator.Frame(Int32.Parse(locator["index=".Length..]));