can i call the java script to code behind file?if yes how?

Answers were Sorted based on User's Feedback



can i call the java script to code behind file?if yes how?..

Answer / swapna

we can call a javascript function from code behind by using

ScriptManager.RegisterStartupScript(this, GetType(),
UniqueID, "alert('asdf');", true);

Is This Answer Correct ?    17 Yes 1 No

can i call the java script to code behind file?if yes how?..

Answer / .net funda

yes u can do it.
write a javascript inside a string.
call Page.ClientScript.RegisterClientScriptBlock() method.

Is This Answer Correct ?    4 Yes 0 No

can i call the java script to code behind file?if yes how?..

Answer / vivek

using Microsoft ajax library and creating a web method we can call a code behind code using java script.

Is This Answer Correct ?    2 Yes 0 No

can i call the java script to code behind file?if yes how?..

Answer / tejkrishna

yes. for custom validation control's server validate event.

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More ASP.NET Interview Questions

Can a master page inherit another master page?

13 Answers   Emphasis, IBM, NIIT, Sebiz Square,


How do you register a .NET assembly?

3 Answers   Microsoft,


What is is post back property in asp net?

0 Answers  


Why is string called immutable data type?

0 Answers  


What is the difference between cookie and session?

0 Answers  






What is the life-span of the items in the viewstate?

0 Answers  


what is the cursor

1 Answers   Wipro,


How to handle errors in Web API?

0 Answers  


I have one application, one user purchase some products in my application? and another person came he is also purchase some products?how can we identify which user purchase which items? my answer is by using session id? but i dont know how? can u give me programming for that?

1 Answers  


How can we update records in gridview?Is there any appropriate code for it?

0 Answers  


What is page request in asp.net?

0 Answers  


Where are session variables stored?

0 Answers  


Categories