Click here to Skip to main content
15,907,395 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have a javascript which returns true or false based on condition
i am code behind
ClientScript.RegisterStartupScript(typeof(Page), "starScript", "function()", true);

i want if it returns true thne it should come back to code else false.

Any suggestion
bbirajdar 30-Oct-12 5:43am    
How do you expect javascript to run on server side? Its a client side scripting language ...

1 solution


ur third parameter is wrong... it should be the script..

for ex.
//ur function here
function DoClick()

u may assign this to a string variable and use it as a third parameter.

then call that function.
<input type="button" value="ClickMe" önclick="DoClick()" />

if u have any clarifications, reply to this...
mark it if u find this useful....
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900