New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the Community Exchange, where community members ask and answer questions about DNN. To get started, just start typing your question below and either select one of the suggested questions or ask a new question of your own.

Call a JavaScript function from my CodeBehind

Return to previous page

  • 3/26/2015
  • 3908 Views

Question:

maco maco long time ago

Hello. I am making a DNN Module with Module Creator. I want to call a JavaScript function from the CodeBehind. 

I added DnnJsInclude in the ascx file. I also wrote this line ClientScript.RegisterStartupScript(sender.GetType(), "", "function_name();", true); in the ascx.cs file.

VisualStudio said that ClientScript doesn´t exits in current context.

How can I fix it?

Call a JavaScript function from my CodeBehind

maco maco
maco maco long time ago
Add an Answer

Answers

Sign In to Participate
Or register to become a member