Thanks both Bruce and Patrice.
Besides hidden field, is there other better way to transmite changed
property by client scipt back to server, e.g. manually adjust view state in
client before post back? That is how to narrow the seperation between server
and client?
Thanks!
Ryan
- Show quoted text -
you can do your own post back, e.g:
let's say youy have a button to submit a form with onclientclick =
"do_form_submit();":
<script>
function do_form_submit()
{
var value_to_submit = document.getElementById("textBox").value;
value_to_submit = value_to_submit + "|" +
document.getElementById("textBox").disabled;
__doPostBack( "form_post_back", value_to_submit);
}
</script>
then, on server -side, something like this (in vb.net):
sub Page_Load(...)
if Page.Request.Params.Get ("__EVENTTARGET") = "form_post_back" then
dim valuePostBackValue as string = Page.Request.Params.Get
("__EVENTARGUMENT")
dim textValue = valuePostBackValue.Split("|")(0)
dim textBoxDisabledValue = valuePostBackValue.Split("|")(1)
end if
.... more at
http://www.siccolo.com/articles.asp ...
end sub