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

  • Home
  • SEARCH
  • 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 5846199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:32:34+00:00 2026-05-22T12:32:34+00:00

In a c# aspx project. I can reach a static method on client side

  • 0

In a c# aspx project.
I can reach a static method on client side with importing my namespace at the beginning part of the page, as follows.

<%@ Import Namespace="utl=portal.library.Utilities" %>

And than in can use that on client side of the same asxp page like.

<script type="text/javascript">
var categoryPage;
categoryPage = '<%= utl.getcategoryName().ToString() %>';
</script>

My question is, can i use that ‘<%= utl.getcategoryName().ToString() %>’ in an external javascript file ?

Is it possible something like that ?

<%@ Import Namespace="utl=portal.library.Utilities" %>
<script src="/scripts/trial.js" type="text/javascript"></script>

and in the trial.js file

var categoryPage;
categoryPage = '<%= utl.getcategoryName().ToString() %>';

thanks in advance..

  • 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-05-22T12:32:35+00:00Added an answer on May 22, 2026 at 12:32 pm

    I don’t think so, because the external .JS file wouldn’t be processed by ASP.NET and therefore wouldn’t have access to those kinds of variables.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This morning, when I tried to add a new ASPX page to my project,
I have a javascript function in the default.aspx page of my asp.net website project.
Hi how i can hide .aspx from all my pages in my project
Can I upgrade my MVC2 project to MVC3 and continue to use my ASPX
I'm wondering if you can use a lightbox with aspx pages? For my project,
I am trying to add a .aspx page in the project , but while
I have an asp.net project, and I load a base aspx page to display
Working on a project with a setup like this: ASPX Page User Control 1
I have one of a aspx page in my asp.net project which has a
I'm working on asp.net (C#) project which include some page files (aspx, aspx.cs) and

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.