Reputation: 245
I have a large string containing a custom HTML tag (xxx). The tag also has two attributes.
How would I retrieve the value of the two attributes and then place the tag and its content with a new string derived from those two attributes?
Thanks for your time.
Upvotes: 1
Views: 8118
Reputation: 18430
If its in string then you should consider using HTML Agility Pack. However it may be overkill so show us some sample string... maybe only some RegEx can do it.
Upvotes: 1
Reputation: 7017
Where do you want to retrieve it? In the code behind?
If your tag is runat="server", you can do:
mytag.Attributes["nameofmyattribute"]
Upvotes: 3