Jose the hose
Jose the hose

Reputation: 1895

how to remove an tag attribute

I have a table that has a summary tag that I want to remove

<table summary="Summary">...

I need to remove the summary tag and I can't use jquery. I need to remove it from the page source.

Is this possible with c#?

Upvotes: 0

Views: 11606

Answers (1)

user1017882
user1017882

Reputation:

Without jQuery:

document.getElementById("myTable").removeAttribute("summary");

or with C#:

<table runat="server" id="myTable" summary="Summary">...
(mark-up)

myTable.Attributes.Remove("summary");
(C#)

Note, the above assumes you're working in asp. net.

Upvotes: 3

Related Questions