For some reason I can't figure out what I'm doing wrong on this - despite several things I've found on the internet.
I'm trying to adjust the size of the page based on information selected prior to the page load or upon a selected change in a dropdown. I have the controls in cells and rows in a table.
This is part of the aspx code:
Then in the .cs file, I've tried:
1. adding this - protected System.Web.UI.WebControls.Literal useJS;
then in the Page_Load and SelectedIndexChange methods, I've put:
.....
useJS.Text="";
--this errors when hit
2. Just adding in the Page_Load and SelectedIndexChange methods:
Javascript:rowTestHide();
--this errors when hit
3. Or I tried this:
String scriptString = "";
Response.Write(scriptString);
--this also errors when I try it
As you can probably see, I don't know what I'm doing. This seems that it would be siimple enough, but I haven't figured it out.
Thanks for your help.
Loading
rulec444Posted Jan 17, 2006, 3:37 PM
A little more searching and this is all I had to put in my C# code in the event I wanted it to fire from:
string rowTestHide = "";
RegisterStartupScript("rowTest",rowTestHide );
It works. I'm not certain this is the most efficient way, but it's a very small application, only accessed through our intranet, so I'm not concerned about a performance hit.
Thanks.