yes, if you create a an html control (like say <input> and set its style to
be visibility:hidd en
You can set this control to runat server:
<input type="textbox" id="tb" style="visibili ty:hidden" runat="server"/>
You can now declare this in your code behind and sets its value.
This will also be retrievable through the JavaScript
code behind:
protected System.Web.UI.H tmlControls.Htm lInputText tb;
then
tb.Value = "Your ID Goes here";
this you should now be able to see in your source, but it will be invisible
on the page.
HTH (still pending on your other question .. gotta do my job :))
"Chris Ashley" <ch***********@ gmail.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
Hi Grant,
Thanks for your help on both points. I find that it's difficult trying
to think about a stateless environment in OO terms!
I'm probably using the literal control totally wrong - basically my
page class has 'pageNumber' int which I was populating a hidden literal
with in the hope that I could access it using client side script. Is
there a better alternative? Any way to populate a hidden form field
using server controls?
Thanks,
Chris