L
Lau Lei Cheong
I have an aspx page which have the following code segment:
<script>
// I do something here
template = "<input id=\"hidden_info_1\" type=\"hidden\"
runat=\"server\">
// I do other things here
</script>
When I tried to run, it returns "Parser Error Message: The Runat attribute
must have the value Server."
Basically I want to create a server-side control with client-side
javascript. I can get rid of the error by removing the \" from the front and
back of "server", but I still want to find a way to have it double-quoted.
And actually this checking should not be inside any <script> tags,
especially when it is just a string. Any ideas?
I know I can do it at the server-side, but because the controls are supposed
to be added too frequently so that the overhead for the whole
"client-server-client" trip is just not acceptable.
<script>
// I do something here
template = "<input id=\"hidden_info_1\" type=\"hidden\"
runat=\"server\">
// I do other things here
</script>
When I tried to run, it returns "Parser Error Message: The Runat attribute
must have the value Server."
Basically I want to create a server-side control with client-side
javascript. I can get rid of the error by removing the \" from the front and
back of "server", but I still want to find a way to have it double-quoted.
And actually this checking should not be inside any <script> tags,
especially when it is just a string. Any ideas?
I know I can do it at the server-side, but because the controls are supposed
to be added too frequently so that the overhead for the whole
"client-server-client" trip is just not acceptable.