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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:14:58+00:00 2026-06-01T02:14:58+00:00

How can I change the HTML code via VB .Net code? For example, on

  • 0

How can I change the HTML code via VB .Net code?

For example,

on .aspx file I have:

<div class="Menu_On"><asp:LinkButton ID="Link_Menu1" runat="server">Menu 1</asp:LinkButton></div>
<div class="Menu_Off"><asp:LinkButton ID="Link_Menu2" runat="server">Menu 2</asp:LinkButton></div>
<div class="Menu_Off"><asp:LinkButton ID="Link_Menu3" runat="server">Menu 3</asp:LinkButton></div>

Then, when I click the “Menu 2” link, the class which coping the link should change become “Menu_On“, and the other class become “Menu_Off“.

How can I do that?

  • 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-01T02:15:00+00:00Added an answer on June 1, 2026 at 2:15 am

    As @Magnus has pointed out, you should run the elements server-side:

    <div id="divMenu1" runat="server" class="Menu_On">....
    <div id="divMenu2" runat="server" class="Menu_Off">....
    <div id="divMenu3" runat="server" class="Menu_Off">....
    

    Then in Link_Menu2 click event, you can do:

    divMenu1.Attributes("class") = "Menu_Off"
    divMenu2.Attributes("class") = "Menu_On"
    divMenu3.Attributes("class") = "Menu_Off"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following html structure (which is generated and I can't change): <table
I have some code like below $(html).on(change, input['data-href'], function() { var href, obj, params;
how can I change my Html into SafeHtml Html htmlText = new Html(); htmlText.setText(result.getText());
I need to change the HTML rendered by the NumericPagerField. I can't use Control
Suppose I have the following html: <div style=width:200px;height:200px;overflow:scroll> ... </div> If the stuff in
I have a strange issue with my code I can't seem to figure out.
I am using ASP.NET MVC and jQuery and I am loading a PartialView via
I have a Change Password page that has a H2 HTML tag that says
I have an ASP.NET web site technology that I use for scores of clients.
I have a file that users will purchase via paypal, clickbank and paydotcom. I

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.