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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:02:12+00:00 2026-06-18T01:02:12+00:00

I have a bit of a problem with a page that needs some re-writing.

  • 0

I have a bit of a problem with a page that needs some re-writing.

Basically, the page on $(document).ready calls via ajax a web service and gets a json object back and then uses that object and a template to generate the page. This works perfectly… until you turn js off and then you just see a blank page.

Anyways, I have been told to make it work for non-js people… and indexable re Google

Now ordinarily I would just make something like <asp:label id="name" runat="server"> and then in code behind fill it. But due to all the other JS that is attached to the page to the different divs and labels etc I am trying to avoid this. E.g. Masonry js is attached amongst others.

Obviously if I change the stuff to runat server then the ids change.

So the question, can I just have in the aspx page simple html and e.g. <%= presult.Name %> and in the code behind something like AWebService ws = new AWebService(); var result = ws.Getdata.... and then made the ‘result’ public with public MyClass presult {get;set;}

Question: Is there any performance problem in doing this over the alternative of making labels runat=server? Is there any other glaring problem in doing this (I have never used .net in this way on the aspx page with <%%> tags. Have read about it, but never used it…. It would seem a more ‘light weight’ alternative given it avoids all the extra stuff put in if you use a server side control label…

Note: I was looking at MVC today amongst my readings. Am I correct in saying that if I don’t have runat=server but the other way above that it is kind of like MVC using the aspx view engine ?
Also, I have seen the posts re making ajax calls #! but we are trying to avoid using those hash tags if possible.

Thanks in advance

Cheers,
Robin

EDIT

As a note, to avoid jumbled client side ids on controls, .net 4.0 has the ClientIDMode which you can set to static….

  • 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-18T01:02:13+00:00Added an answer on June 18, 2026 at 1:02 am

    There’s nothing wrong with the approach you are trying to take.
    But i would rather put the result inside a couple of noscript tags to ensure they only get displayed when js is turned off.

    <noscript>
        <%= presult.Name %>
    </noscript>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bit of problem when trying to validate my page as HTML5.
I have a bit of a problem that I can't seem to code my
I have a bit of a strange problem. I have a music app that
I have an HTML Document that looks a bit like this, only is far
I am currently finishing a web page in php. Basically there is some data
I have a problem with an ASP.NET MVC page that shows a list of
I have a bit of a problem. I am trying to do the following
I have a bit of a problem building my project. I'm getting the bellow
I have a bit of a problem here. I have a third party ActiveX
So, I have a bit of a problem. I'm trying to convert an array

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.