Getting the title from a refering html <map> RRS feed


  • User1006193418 posted

    I have a map of the us that is broken into an html image map. (not asp). What I'm wondering is it possible to get the title of the refering link on the map?


    Based on my understanding, you need to fetch the links as contacts.html, products.html and new.html from the code above in your post. So, I suggest you using Regular Expression to make it.

    Please refer to this demo to see if it meets your requirement.

    <%@ Page Language="C#" %>
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
            string s = @"<MAP NAME=""map1"">
        HREF=""contacts.html"" ALT=""Contacts"" TITLE=""Contacts""
        SHAPE=RECT COORDS=""6,116,97,184"">
        HREF=""products.html"" ALT=""Products"" TITLE=""Products""
        SHAPE=CIRCLE COORDS=""251,143,47"">
        HREF=""new.html"" ALT=""New!"" TITLE=""New!""   
        SHAPE=POLY COORDS=""150,217, 190,257, 150,297,110,257"">
            Regex r = new Regex(@"HREF=""(\w+).html""");
            foreach (Match m in r.Matches(s))
                Response.Write(m.Groups[1].ToString() + "<br />");
            Response.Write("<br />");
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <form id="form1" runat="server">

    Best Regards,
    Shengqing Yang

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 22, 2009 8:26 AM