You could select it ahead of time. Typically I create a dropdownlist in the module settings, bind it to the TabController and save it as a setting.
ddlSuccessPage.DataSource = TabController.GetPortalTabs(this.PortalId, -1, true, Localization.GetString("DefaultSuccessPagesListItem.Text", this.LocalResourceFile), true, false, false, true, true);
ddlSuccessPage.DataValueField = "TabID";
ddlSuccessPage.DataTextField = "IndentedTabName";
ddlSuccessPage.DataBind();
if (Settings["SuccessPage"] != null)
{
ddlSuccessPage.SelectedValue = Settings["SuccessPage"].ToString();
}
PS - As Sebastian mentioned you get "see" the tabid in the url when editing the page you can get the current tabid programmatically using this.TabId