---
title: "Call javascript's function from code behind"  
description: "Call javascript's function from code behind"  
author: "Anonymous User"  
published: 2014-08-29  
updated: 2014-09-01  
canonical: https://www.mindstick.com/forum/2199/call-javascript-s-function-from-code-behind  
category: "javascript"  
tags: ["javascript"]  
reading_time: 1 minute  

---

# Call javascript's function from code behind

I use below code for call [javascript](https://www.mindstick.com/articles/874/how-to-create-watermark-text-for-textbox-by-using-javascript)'s [function](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) from [code behind](https://www.mindstick.com/forum/2090/send-data-from-asp-dot-net-code-behind-to-a-javascript-function) but doesn't call function

```
//C#Page.ClientScript.RegisterStartupScript(this.GetType(), "close panel", "CloseFunction()", true);//javascriptfunction CloseFunction() {            alert("call");            }
```

## Replies

### Reply by Sumit Kesarwani

Hi Chintoo, \
Use this:

Page.ClientScript.RegisterStartupScript(this.GetType(), "close panel", "CloseFunction()",

true);


---

Original Source: https://www.mindstick.com/forum/2199/call-javascript-s-function-from-code-behind

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
