public static string GetOrCreateId(jQueryObject element) { string id = element.GetAttribute(Id); if (string.IsNullOrEmpty(id)) { id = Helper.CreateId(); element.Attribute(Id, id); } return id; }