I'm trying to change the height of a div with an id='"spacer" if a list has no data so to correct the look of the form. The code is right and the script get registered but it does not fire. Here is the code.
//save file list to session variable
if (CSVFileListing.Count > 0)
{
grdFileListing.Visible = true;
}
else
{
string script = Utility.getSpacingScript();
grdFileListing.Visible = false;
ClientScript.RegisterStartupScript(this.GetType(), "spacer", script);
}
SetSessionState(CSVFileListing);
//hide gridview if there are no records
//bind gridview
grdFileListing.DataSource = GetSessionState();
grdFileListing.DataBind();Here is the javascript code returned from the call. I put the alert in there to see if it fired.
Go to the complete details ...