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 580389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:28:03+00:00 2026-05-13T14:28:03+00:00

I am on .aspx page and i want to take the width and height

  • 0

I am on .aspx page and i want to take the width and height of a control from a static class
where i have defined them as constans.

Is there any way to access that class directly from the aspx page?

I know that i can make a method like:

width="<%= getWidthSize() %>"

and inside the aspx.cs to define this method to take the size from that static class.

But i am asking if this could be directly managed from the web aspx page…?

Thanks.

  • 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-13T14:28:04+00:00Added an answer on May 13, 2026 at 2:28 pm

    If they’re in the same namespace, you can simply use

    <%= ClassName.StaticMethod() %>
    

    If the method you want to call is in another namespace, you need to either specify the full path

    <%= Namespace.ClassName.StaticMethod() %>
    

    or add an import page directive

    <%@ Import namespace=”Namespace” %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an aspx page that I want to convert to an HttpHandler ,
I have scripts in my ASPX page, in the header section. I want to
I have a page http://www.mysite.com/image.aspx , that I want to load and display an
I have an Asp .net page like this simple one http://issamsoft.com/app2/page1.aspx and I want
I have many links in my page. For example <a href=/promotions/download/schools/australia.aspx>Australia</a> Now I want
I have an aspx-Page with an anchor-tag. It´s href has to take a parameter
I want to create a Dynamic aspx Page in current solution through code-behind..forexample i
I want to create object on the client side of aspx page. And i
I want to select a value in a Grid view cell on aspx page.
I want to pass '#' to the query string like ?page.aspx?someParam=1234#5 .

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.