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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:30:31+00:00 2026-05-25T13:30:31+00:00

In Classic ASP, I loved the fact that I could write out variables, formulas,

  • 0

In Classic ASP, I loved the fact that I could write out variables, formulas, etc., etc. with a simple:

<span class='<%=myClass%>'><%=myariable%></span>

I could format it, or do anything I Wanted. It was easy. I could even run functions on them, etc. I know, in .Net, I can still do all the functions etc., (And the fact that it’s treated like an object is good), but I seem to be doing a lot of this, and it’s annoying!!!

<asp:Label ID='pnlMyVariable' runat='server'></asp:Panel>
%% CODE BEHIND %%
pnlMyVariable.Text = "Yeah, write this short sentence...";
pnlMyVarialbe.CssClass = "blah";

And don’t get me started with the annoying, yet somewhat useful FindControl method!

Is this really the way it is to be? If you say “YES, That’s just the way it is”, then I will accept it. But surely some people out there (If any are old enough to appreciate Classic ASP) who have seen this to be a little annoying. Am I approaching this correctly?

  • 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-25T13:30:32+00:00Added an answer on May 25, 2026 at 1:30 pm

    You’re using the asp:Label control correctly, yes. However, it’s not a requirement that you use this control. You have lots of other options, but the two which will likely appeal to you the most are:

    1. Use the asp:Literal control. This will work much like a Label but doesn’t wrap the value in any additional markup. This allows you to control the markup and styling just like you did “in the old days.”

    2. Use the classic syntax. If your page class has a public or protected property on it, that property can be referenced in the markup using the same classic ASP syntax. As a matter of convention in .NET and for a number of good reasons, it’s best to use properties instead of directly accessing member variables. But that might end up just being a matter of preference for you.

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

Sidebar

Related Questions

Classic ASP had 'server side includes' so that one could easily design a generic
We've got a classic ASP application that is putting out some very large reports,
In classic ASP there is a global object called Application that is accessed simultaniously
In Classic ASP, how do you detect on that the page got control via
As a classic ASP developer about once a year since ASP.NET came out I
We have a classic ASP application that simply works and we have been loathe
I have a large classic ASP app that I have to maintain, and I
Using Classic ASP (stop tutting), I need to build an application that transfers high
I have inherited a classic asp application that had over 800 files in the
In a classic ASP Website, how can I use a DLL that is a

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.