Solved

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

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
"Emulate" TAB key when press Enter Key 3 91
Where is this file? 3 42
linq .concat equivalent with expression syntax 4 41
Building an object from several other objects 4 36
Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

739 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