Friday, September 03, 2010

How to find html tags and content inside rendered html in code behind

Finding html tags and tag content in the code behind is something you may find useful  when providing custom render time tweaks your website. By the render time you can control many more features like root URL and broken links etc. Following are two useful scripts that you may find useful when tweaking rendered html of pages.

Please consider this example:
<html xmlns="">
<head id="Head1" runat="server">
    <script language="javascript">
        function SayHello() {
    <form id="form1" runat="server">
        <p>This is sample paragraph and this is my image 
            <img src="Images/Picture.jpg" alt="Picture" /></p>       

Find tag:
Example: image tag <img>
<img src="Images/Picture.jpg" alt="Picture" />
Please refer this article for more information

Find tag content:
Example: script tag content <script>
function SayHello() {
Please refer this article for more information

No comments:

iPhone Launch Screen Sizes

iPhone Portrait iOS 8 Retina HT 5.5 = 1242 X 2208 Retna HD 4.7 = 750 X 1134 iPhone Landscape iOS 8 Retina HD 5.5  2208 X 1242 iPho...