Converting Asp.Net Variables to JavaScript in Windows
#1
Posted 21 July 2013 - 01:54 PM
2. From Visual Studio go to File->Open and select your ASP project and click Open. This will load your ASP project’s files in the work desk.
3. Double click the form containing your JavaScript function.
4. From the bottom click "View Code" to open your HTML and JavaScript code.
5.Type the bellow open and close tags for your ASP script in the JavaScript location where you want the ASP variable to be:
The ASP code should be added between these two tags <% %>
5 enter the below code to convert the ASP variable to JavaScript:
=ASPVar
ASPVar is the name of your variable
#2
Posted 06 June 2024 - 11:26 AM
1. From your Windows Go to start->All Programs->Microsoft .NET->Visual Studio
2. From Visual Studio go to File->Open and select your ASP project and click Open. This will load your ASP project’s files in the work desk.
3. Double click the form containing your JavaScript function.
4. From the bottom click "View Code" to open your HTML and JavaScript code. HealthInsuranceMarket
5.Type the bellow open and close tags for your ASP script in the JavaScript location where you want the ASP variable to be:
The ASP code should be added between these two tags <% %>
5 enter the below code to convert the ASP variable to JavaScript:
=ASPVar
ASPVar is the name of your variable
Hello,
<script> function myFunction() { var message = "<%= WelcomeMessage %>"; // Accessing ASP.NET variable "WelcomeMessage" alert(message); } </script>
Also tagged with one or more of these keywords: convert asp.net variables, to javascript in windows
Web Design →
Javascript →
Convert Asp.Net Variables to JavaScriptStarted by OneDes, 16 Apr 2013 ![]() |
|
![]() |
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users