I've been using page.registerstartupscript in my C# code behind. Here's an example:
string item1="category1"; string Script = "window.program = '" + item1 + "';"; Page.RegisterStartupScript("PopupScript", Script);
The variable item1 is dynamically generated from a value in the code behind. However, it doesn't seem to be working as expected. Any suggestions on where I might be going wrong?