protected void lnkOrder_Click(object sender, EventArgs e) { foreach (GridViewRow gvr in dtgZones.Rows) { Label lblID = (Label)(gvr.FindControl("lblID")); if (lblID != null) { // lblNotice_1.Text = lblID.Text; DropDownList ddlOrder = (DropDownList)gvr.FindControl("ddlOrder"); int newOrder = ConvertUtility.ToInt32(ddlOrder.SelectedValue); int tabID = ConvertUtility.ToInt32(lblID.Text); ZoneDB.SetPriority(tabID, newOrder); } } LoadZones(); }