A hidden field can be something similar to the input element as suggested in the example below ? <script runat="server"> public void Page_Load(Object sender, EventArgs e) { // Define the name and type of the client scripts on the page. String csname2 = "ButtonClickScript"; Type cstype = this.GetType(); // Get a ClientScriptManager reference from the Page class. ClientScriptManager cs = Page.ClientScript; // Check to see if the client script is already registered. if (!cs.IsClientScriptBlockRegistered(cstype, csname2)) { StringBuilder cstext2 = new StringBuilder(); cstext2.Append("<script type=\"text/javascript\"> function DoClick() {"); cstext2.Append("var oElement = document.all.Panel1; Form1.Message.value= oElement.offsetLeft;} </"); cstext2.Append("script>"); cs.RegisterClientScriptBlock(cstype, csname2, cstext2.ToString(), false); } } </script> <html > <head> <title>ClientScriptManager Example</title> </head> <body> <form id="Form1" runat="server"> <input type="text" id="Message" /> <input type="button" value="ClickMe" onclick="DoClick()" /> <asp:Panel ID="Panel1" runat="server" style="position:absolute;top: 375px;left: 628px;height: 422px;width: 513px; border-color:Red;border-width:thick;border-style:solid"></asp:Panel> </form> </body> </html> edit: Example is based from MSDN article http://msdn2.microsoft.com/en-us/library/z9h4dk8y.aspx[[^](http://msdn2.microsoft.com<br mode= "New Window")] edit: sorry I worked out what a hidden field is thanks to google http://msdn2.microsoft.com/en-us/library/system.web.ui.htmlcontrols.htmlinputhidden(VS.71).aspx[^]
modified on Thursday, December 06, 2007 8:33:21 AM