Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

ASP.net Include a frame in a GridView

Hi

I got the following off Google maps to embed a street view into my ASP.net site

How would I update the code further down which puts images in a GridView to rather include this frame

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?
f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=47+Atholl-Oaklands+Road,+Johannesburg+2076,+South+Africa&amp;aq=&amp;sll=-26.135848,28.069382&amp;sspn=0.01098,0.024784&amp;ie=UTF8&amp;hq=&amp;hnear=47+Atholl-Oaklands+Rd,+Birnam,+Johannesburg,+City+of+Johannesburg+Metropolitan+Municipality,+Gauteng+2196,+South+Africa&amp;ll=-26.135848,28.069382&amp;spn=0.01098,0.024784&amp;t=m&amp;z=14&amp;layer=c&amp;cbll=-26.136924,28.067259&amp;panoid=r9ZiJXaettPfl6ub-zk41Q&amp;cbp=12,15.89,,0,0.81&amp;output=svembed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=47+Atholl-Oaklands+Road,+Johannesburg+2076,+South+Africa&aq=&sll=-26.135848,28.069382&sspn=0.01098,0.024784&ie=UTF8&hq=&hnear=47+Atholl-Oaklands+Rd,+Birnam,+Johannesburg,+City+of+Johannesburg+Metropolitan+Municipality,+Gauteng+2196,+South+Africa&ll=-26.135848,28.069382&spn=0.01098,0.024784&t=m&z=14&layer=c&cbll=-26.136924,28.067259&panoid=r9ZiJXaettPfl6ub-zk41Q&cbp=12,15.89,,0,0.81" style="color:#0000FF;text-align:left">View Larger Map</a></small>



    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Page.DataBind()  
    End Sub

    Protected Sub btnSort_Click(sender As Object, e As EventArgs) Handles btnSort.Click
        Call SortGridView()
    End Sub

    Sub SortGridView()
        Try
            GridView1.DataSource = Nothing

            Dim dt As New DataTable()
            dt = GetData()
            Dim dv As DataView = dt.DefaultView
            dv.Sort = "Title"
            GridView1.DataSource = dv
            GridView1.DataBind()
        Catch ex As Exception

        End Try

    End Sub

    Function GetData() As DataTable
        ' This method creates a DataTable with four rows.  Each row has the
        ' following schema:
        '   PictureID      int
        '   PictureURL     string
        '   Title          string
        '   DateAdded      datetime
        Dim dt As New DataTable()
        ' define the table's schema
        dt.Columns.Add(New DataColumn("PictureID", GetType(Integer)))
        dt.Columns.Add(New DataColumn("PictureURL", GetType(String)))
        dt.Columns.Add(New DataColumn("Title", GetType(String)))
        dt.Columns.Add(New DataColumn("DateAdded", GetType(DateTime)))
        ' Create the four records
        Dim dr As DataRow = dt.NewRow()
        dr("PictureID") = 1
        dr("PictureURL") = ResolveUrl("~/Resources/Craighall_Hands_On_Retreat.jpg")
        dr("Title") = "zBlue Hills"
        dr("DateAdded") = New DateTime(2005, 1, 15)
        dt.Rows.Add(dr)
        dr = dt.NewRow()
        dr("PictureID") = 2
        dr("PictureURL") = ResolveUrl("~/Resources/Craighall_Park_Abbey_Guest_House.jpg")
        dr("Title") = "Sunset"
        dr("DateAdded") = New DateTime(2005, 1, 21)
        dt.Rows.Add(dr)
        dr = dt.NewRow()
        dr("PictureID") = 3
        dr("PictureURL") = _
          ResolveUrl("~/Resources/Melrose_Melrose_Place_Guest_Lodge.jpg")
        dr("Title") = "Water Lilies"
        dr("DateAdded") = New DateTime(2005, 2, 1)
        dt.Rows.Add(dr)
        dr = dt.NewRow()
        dr("PictureID") = 4
        dr("PictureURL") = ResolveUrl("~/Resources/Melrose_The_Peech_Hotel.jpg")
        dr("Title") = "Winter"
        dr("DateAdded") = New DateTime(2005, 2, 18)
        dt.Rows.Add(dr)
        Return dt
    End Function
ASKER CERTIFIED SOLUTION
Avatar of Rajar Ahmed
Rajar Ahmed
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

Thanks for the help