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
Solved

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

Posted on 2004-04-07
3
754 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
3 Comments
 

Accepted Solution

by:
Keeshan earned 50 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

808 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