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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:37:02+00:00 2026-05-27T02:37:02+00:00

In an ASP.NET web forms project that is not quite ready to be upgraded

  • 0

In an ASP.NET web forms project that is not quite ready to be upgraded from 2.0 to 4.0 , there is a change that needs to be made to allow modifications to the HTML and BODY tags on the pages without adding runat=server to the tags which results in the 2.0 styled “ugly ids” like “ctrl_100…”

For example, how could we change these using JavaScript, a Response Filter (the regex to find these specific tags would really help on this one), or something else…from:

<html xmlns="//www.w3.org/1999/xhtml">
<body>

To:

<html lang="jp=JP" xmlns="//www.w3.org/1999/xhtml" dir="rtl">
<body dir="rtl">

JavaScript seems like a possibility, but functions from the server-side could would determine the language and direction the page should have.

  • 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-27T02:37:03+00:00Added an answer on May 27, 2026 at 2:37 am
    namespace Website
    {
        public static class Utils
        {
            public static string HtmlAttributes()
            {
                 return " lang='jp=JP' dir='rtl'";
            }
            public static string BodyAttributes()
            {
                 return " dir='rtl'";
            }
        }
    }
    
    <html xmlns="//www.w3.org/1999/xhtml"<%= Website.Utils.HtmlAttributes()%>>
    <body<%= Website.Utils.BodyAttributes()%>>
    

    If you are sure that there are always some attributes you can remove the first whitespace and add it in markup.

    I prefer this method to the javascript method because with the latest the search engines can’t know what language or what direction has the html page.

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

Sidebar

Related Questions

I am working on an ASP.NET 4.0 web forms project that uses page routing
I have an Asp.Net 4.0 Web Forms project that uses url routing for user
Currently, I'm converting a web application from web forms to ASP.NET MVC. The project
I've included a mobile web form in my asp.net project, I thought that it
I'm adding some ASP.NET MVC pages to an existing ASP.NET Web Forms project. I've
I'm trying to use SWFUpload with an ASP.NET Web Forms project. I need to
I've seen a little buzz on the open-source ASP.NET Web Forms MVP project, but
I've started working on some enhancements to an ASP.NET web forms e-commerce project, one
I've integrated ASP.NET MVC 3 project into existing Web Forms project. It was working
Background: I'm testing a function within an ASP.NET 4.0 (Web Forms not MVC) 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.