ASP.NET Page displays series of maps?

Discussion in 'ASP .Net' started by John Straumann, Sep 2, 2009.

  1. Hi all:

    I have an ASP.NET application that reads a list of addresses from a SQL
    database, and then I want to display the Maps for these addresses as a table
    on the ASPX page....I tried using a repeater control, building the URL in
    the code-behind file from the addresses read from SQL, and then displaying
    the map thus:

    <asp:Repeater ID="maps" runat="server">
    <HeaderTemplate />
    <ItemTemplate>
    <asp:Image ID="MapImage" runat="server"
    ImageUrl="<%#DataBinder.Eval(Container.DataItem, "Map") %>" />
    </ItemTemplate>
    <FooterTemplate />
    </asp:Repeater>

    but I am getting an error: "The server tag is not well formed"

    Can anyone make a suggestion as to what I am doing wrong OR make a better
    suggestion as to how I can accomplish this?

    Thanks for any and all input.

    John.
     
    John Straumann, Sep 2, 2009
    #1
    1. Advertising

  2. Hi mark:

    Thanks for the note. Are those single-quotes around the word Map? That
    generates an error "Too many characters in character literal"

    I thought of possibly using a tab container and adding a tabpanel for each
    map, and then an iFrame to the tab panel to display the map, but I cannot
    figure out how to add a iFrame from the code-behind...I have to do all this
    from the code-behind as the list of things to display is dynamic....

    What do you think?

    John.

    "Mark Rae [MVP]" <> wrote in message
    news:...
    > "John Straumann" <> wrote in message
    > news:...
    >
    >> Can anyone make a suggestion as to what I am doing wrong OR make a better
    >> suggestion as to how I can accomplish this?

    >
    > <asp:Image ID="MapImage" runat="server"
    > ImageUrl="<%#DataBinder.Eval(Container.DataItem, 'Map') %>" />
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
     
    John Straumann, Sep 2, 2009
    #2
    1. Advertising

  3. I don't know what top-post means. :)

    I got past this...thanks! but I also realized that this won't work since the
    url does not point to an image, but to a web page! So I am back to what I
    thought would be a simple thing to do, display a series of web pages on an
    ASPX form from a code-behind file....

    John.

    "Mark Rae [MVP]" <> wrote in message
    news:#...
    > "John Straumann" <> wrote in message
    > news:...
    >
    > [please don't top-post]
    >
    >>>> Can anyone make a suggestion as to what I am doing wrong OR make a
    >>>> better suggestion as to how I can accomplish this?

    >
    >>> <asp:Image ID="MapImage" runat="server"
    >>> ImageUrl="<%#DataBinder.Eval(Container.DataItem, 'Map') %>" />

    >>

    >
    >> Are those single-quotes around the word Map?

    >
    > Yes.
    >
    >
    >> That generates an error "Too many characters in character literal"

    >
    > Hmm - OK, then, try this:
    >
    > <asp:Image ID="MapImage" runat="server"
    > ImageUrl='<%#DataBinder.Eval(Container.DataItem, "Map") %>' />
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
     
    John Straumann, Sep 2, 2009
    #3
  4. Ah, gotcha....so any suggestions as to how I can solve this issue (from the
    original thread)make this work?

    John.

    "Mark Rae [MVP]" <> wrote in message
    news:...
    > "John Straumann" <> wrote in message
    > news:...
    >
    >> I don't know what top-post means. :)

    >
    > It means replying *above* the text that you're replying to instead of
    > *below* the text that you're replying to, thereby forcing everybody else
    > to read the thread backwards:
    > http://www.caliburn.nl/topposting.html
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
     
    John Straumann, Sep 3, 2009
    #4
  5. "Mark Rae [MVP]" <> wrote in message
    news:...
    > "John Straumann" <> wrote in message
    > news:...
    >
    > [please don't top-post]
    >
    >>>> I don't know what top-post means. :)

    >
    >>> It means replying *above* the text that you're replying to instead of
    >>> *below* the text that you're replying to, thereby forcing everybody else
    >>> to read the thread backwards:
    >>> http://www.caliburn.nl/topposting.html

    >
    >> Ah, gotcha....

    >
    > It would appear not...


    LOL...Don't be a smart ass, you never know when you'll meet someone in
    person! :)
    >
    >> so any suggestions as to how I can solve this issue (from the original
    >> thread)make this work?

    >
    > Hmm - you want to display web pages inside other web pages? Probably the
    > easiest way is to use <iframe /> controls:
    > http://www.w3schools.com/TAGS/tag_iframe.asp
    >
    > But is this what you really want...?


    Well I am not sure, I thought this would be a very easy thing to do. I just
    need to, from a list of addresses, retrieve the maps for each address, and
    then display those maps on an ASPX page. But since each map is its own web
    page, I am having difficulty determining how to display them all on one ASPX
    page as I need to.

    I did find some posts on iFrames, but they required the iFrame to be part of
    the ASPX page, which I cannot do as I do not know how many iFrames I need. I
    need to be able to do everything from the code-behind.

    Any and all suggestions are most welcome.

    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
     
    John Straumann, Sep 3, 2009
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chumley Walrus
    Replies:
    1
    Views:
    12,202
    =?Utf-8?B?QnJpYW4gQnJvd24=?=
    Dec 16, 2004
  2. Simon Elliott
    Replies:
    4
    Views:
    1,173
    Simon Elliott
    Mar 10, 2005
  3. Marcus
    Replies:
    2
    Views:
    598
    Marcus
    Dec 9, 2005
  4. Kerry Sutton

    default ASP page displays but others don't

    Kerry Sutton, Sep 18, 2003, in forum: ASP General
    Replies:
    3
    Views:
    236
    Mark Schupp
    Sep 18, 2003
  5. John L.
    Replies:
    10
    Views:
    247
    Thomas 'PointedEars' Lahn
    May 18, 2009
Loading...

Share This Page