can javascript method call another method in a c# script?
-
-
Hi, i would really need to know how could a javascript method call another method written in a c# script at the same client ofcourse!! or if any one could help me in a highlighting function in javascript? your responces are highly appreciated.. Thanx:-D
you cannot call a server function from client without postback. I don't what you want to do. to highlight a row you have to add onclick attribute to the row on rowdatabound and in that function (javascript) you can do row.style.backgroundColor = 'blue'
-----
-
Hi, i would really need to know how could a javascript method call another method written in a c# script at the same client ofcourse!! or if any one could help me in a highlighting function in javascript? your responces are highly appreciated.. Thanx:-D
To talk between the client and server, you'd have to psotback, or use AJAX.... There's no way to simply "call" a server side funciton from the client
"Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox
-
To talk between the client and server, you'd have to psotback, or use AJAX.... There's no way to simply "call" a server side funciton from the client
"Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox
Thanks all for replies :) my question is if i can call a c# script method from the javascript on the client, NOT a server method.. its bcus i wrote my code in c# script and i found out that the java script is going to deal with it too, i don't know if there's some way but i could'nt found any yet!! thanks all again..
-
Thanks all for replies :) my question is if i can call a c# script method from the javascript on the client, NOT a server method.. its bcus i wrote my code in c# script and i found out that the java script is going to deal with it too, i don't know if there's some way but i could'nt found any yet!! thanks all again..
Right then - think you're labouring under a misapprehension here - your c# code IS NOT RUNNING ON THE CLIENT - it's on the server - the fact that it's in the same page as the markup and the js is immeterial - look for the runat=server / <% %> indicators = both mean the code is ACTUALLY executing on the server.
"Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox