Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How do we call a VBScript / Java Script Function from Code behind (aspx.cs) C# Class?

Posted on 2004-04-07
3
Medium Priority
?
797 Views
Last Modified: 2007-12-19
How do we call a VBScript / Java Script Function from Code behind (aspx.cs) C# Class?
I want to call a VBScript Function (in the ASPX file) from aspx.cs (from a function in class), so that it executes that VBScript Code.
0
Comment
Question by:MrigankaB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Accepted Solution

by:
Keeshan earned 200 total points
ID: 10803998
add this line in your html:

<script language="javascript" src="msgBox.js"></script>

if you have your script in a file, else

<script language="JavaScript">
                  
function MyFunction()
{....}

then from your code, you can call the javascript you have created.  
Ex.  to open a new window using scripts

Page.RegisterClientScriptBlock("open", "<script language='javascript' for=window event=onload>OpenMyWindow();</script>");


Change the parameters to what is appropriate for your code. (ex. javascript to vbscript, function names, etc.)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question