On serverside you cannot debug clientside script.
Make script in Html and then turn it into String on server can be a
solution. This string on server can be changed dinamically for accept
parameters.
RegisterClientS criptBlock MSDN remark:
The client-side script is emitted just after the opening tag of the Page
object's <form runat= server> element. The script block is emitted as the
object that renders the output is defined, so you must include both tags of
the <script> element.
RegisterStartup Script MSDN remark:
Similar to the RegisterClientS criptBlock method, this method emits the
script just before the closing tag of the Page object's <form runat= server>
element. The script block is emitted as the object that renders the page is
defined, so you must include both tags of the <script> element.
Brun
"Shaul Feldman" <sf******@write me.com> wrote in message
news:uT******** *****@tk2msftng p13.phx.gbl...
Thank you for help,
the problem is when you write htmlInput.Attri butes["OnChange"] = "doSomething(); " the "doSomething(); " is a string, and I can't debug it on the server side,
only accept client-side errors.
Is there any efficient way to write that "doSomething(); " than a simple
string object, in order to debug?
Or I should first write it in regular html file and only after that turn
into String on server-side?
Also would you be so kind to stay on the differences between those two
methods you wrote, "RegisterClient ScriptBlock" and
"RegisterStartu pScript" - what are differences?
Thanks a lot again :)
--
With the best wishes,
Shaul Feldman
"Bruno Sirianni" <br***********@ virgilio.it> wrote in message
news:zx******** ************@ne ws4.tin.it... With ASP.NET javascript generate serverside is very simple.
You can use RegisterClientS criptBlock or RegisterStartup Script method.
For Javascript fired by html element you can make this element runat server and write code similar this :
htmlInput.Attri butes["OnChange"] = "doSomething(); "
Brun
"Shaul Feldman" <sf******@write me.com> wrote in message
news:e8******** *****@TK2MSFTNG P10.phx.gbl... Hello,
I'm trying to figure out what's the most convinient way to write
JavaScript code in ASP.Net, espacially when JavaScript code has to recieve
certain values from server side. In classic ASP it was quiet simple, here I
get in trouble. Thank you for your help.
S. Feldman