Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8068351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:39:20+00:00 2026-06-05T12:39:20+00:00

I have my script.js into the folder script. I’d like to manage, into that

  • 0

I have my script.js into the folder script.
I’d like to manage, into that script, some C# variable, from a Web Form (e.g. <%= myString = 3 %>).

I think this is not possible, but maybe can I do it in some way? Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T12:39:22+00:00Added an answer on June 5, 2026 at 12:39 pm

    Javascript is client side executed code, and C# is server side executed code. So you can’t strictly make a “variable” visible, as they’re two completely different code platforms/runtimes, running on two different computers. However you can still marshal the data between them in a few different ways.

    • Write a web service and call it via AJAX
    • Populate a control or your URL for your page with your data, and query it via the Javascript DOM API (or via some wrapper library like jQuery)

    An example of the 2nd (since you asked):

    <!-- Somewhere in your page -->
    <span style="visibility:hidden" id="myData"><%= myString %></span>
    
    // In Javascript, using jQuery:
    var myData = $('#myData').text();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Greasemonkey script that dynamically inserts an HTML form into some web
I have a VBA script that inserts long strings into Excel cells. In some
I have a php script that inserts data from an Android app into a
I have a script that copies some files into a project. Such a project
I have a script that loads big images into the body in this fashion
I have a script that will convert a text file into a resource file,
I have a script that uses BeautifulSoup that I want to make into a
I have a VBA script that imports a layout into an exsting drawing, its
I have a script that is copying a folder that contains a couple sub
I am trying to have an automated script that enters into the most recently

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.