I am using this code to hide the "+" button if there is a single record.
It is now hiding the "+" button all the time, even if there is no records.
Can anyone tell me why this is not working, or help with the code? I've tried rec count with null, but that also does not work.
I get no errors.
Thanks
// Page Load event
public void Page_Render() {
//Log("Page Render");
var rec_count = ExecuteScalar("select count(*) from <MyTable>.");
if(rec_count != "1")
{
var addlink = OtherOptions["addedit"].GetItem("add");
addlink.Visible = false;
}
}