Calling client function from server script

  • Thread starter Thread starter J. Marcelo Barbieri
  • Start date Start date
J

J. Marcelo Barbieri

a.. How to write server script to call a client side function written in
JavaScript?
a.. When using Validation controls, it uses a file named
WebUIValidation.js. This file is sent to the client machine to do the
validation? Where can I find it in the client machine?
thanks a lot.
 
Hi,

1) You can’t directly call client side script from the server side code.
Although the current request process and create new response for certain
page the server side code got nothing to do with the client. The server
side code receives all the data that he need in the request headers. He
can’t access the client.
However you can simulate this by embedding client side
script(RegisterClientsideScript, RegisterStartupScript,...) that will
run on the client side.

2) The WebUIValidation.js isnt send to the client as file. just the
WebUIValidation.js. source is download to the client and embedded to the
HTNL source.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
 
Back
Top