BDRichardson
Programmer
Hi,
This problem has been baffling me for some time now.
I wish to determine the client area of a webform using JavaScript, so that I can then re-size controls appropriately within the form.
I believe that I may be able to accomplish this by somehow calling a JavaScript function from within a Page event handler. For example, when the form loads, or is resized, I could call the JavaScript function(s) and store the returned values in local C# class fields.
I also wish to store the JavaScript in an external file, and register it, probably using the 'RegisterClientScriptInclude' method.
Please can anyone clarify whether this is both feasible, and sensible solution to the problem. If so, how can I call the function from within a Page event?
I am aware that you can call JavaScript functions from within Markup code, but I believe I need to do it from within C#, because I need to use the values returned from the function to set WebForm Control properties.
Any assistance would be greatly appreciated.
This problem has been baffling me for some time now.
I wish to determine the client area of a webform using JavaScript, so that I can then re-size controls appropriately within the form.
I believe that I may be able to accomplish this by somehow calling a JavaScript function from within a Page event handler. For example, when the form loads, or is resized, I could call the JavaScript function(s) and store the returned values in local C# class fields.
I also wish to store the JavaScript in an external file, and register it, probably using the 'RegisterClientScriptInclude' method.
Please can anyone clarify whether this is both feasible, and sensible solution to the problem. If so, how can I call the function from within a Page event?
I am aware that you can call JavaScript functions from within Markup code, but I believe I need to do it from within C#, because I need to use the values returned from the function to set WebForm Control properties.
Any assistance would be greatly appreciated.