js: var flag = true; function chkRadio(id) { id.checked = flag; flag = !flag; } aspx.cs: this.rbtKey.Attributes.Add("onclick", "chkRadio(this)");