I wanna the src of iframe consist the link of website which include the game.
My Games.aspx page consist data list which retrieve the name and thumbnail image for the game from data in SQL server. When the user click on the name of game or thumbnail image the Player.aspx image will open with iframe which consist the game which select by the user.
So I wanna just one code make that
For more information:
This is the datalist code in Games.aspx page:
<asp

ataList ID="DataList2" runat="server" align="center" BorderColor="#404040"
BorderStyle="Outset" BorderWidth="2px" Height="227px" HorizontalAlign="Center"
RepeatColumns="3" RepeatDirection="Horizontal" Width="788px">
<AlternatingItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
<ItemTemplate>
<br />
<asp:ImageButton ID="ImageButton1" runat="server" Height="100px" ImageUrl='<%# Eval("Gamephoto") %>'
OnClick="ImageButton1_Click" Width="100px" /><br />
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/GamePlayer.aspx?Game=1" Text='<%# Eval("GameName") %>' >HyperLink</asp:HyperLink><br />
<br />
</ItemTemplate>
</asp

ataList >
In Games.aspx.vb
#Region "[ Load Games ]"
Private Sub GetGames()
Dim objCommand As SqlCommand
Dim objConnection = New SqlConnection(connString)
Dim objDataSet1 As DataSet
Dim objAdapter1 As SqlDataAdapter
Dim datasrc As SqlDataSource
objConnection.Open()
objCommand = New SqlCommand()
objCommand.Connection = objConnection
objCommand.CommandText = "GetGamesinfo"
objCommand.CommandType = CommandType.StoredProcedure
objDataSet1 = New DataSet()
objAdapter1 = New SqlDataAdapter(objCommand)
datasrc = New SqlDataSource
objAdapter1.Fill(objDataSet1)
'Assign the retrieved value to the control
DataList2.DataSource = objDataSet1
DataList2.DataBind()
objConnection.Close()
objConnection.Dispose()
End Sub
#End Region
First I wanna save the id of game selected in the session but I don’t how I did that.
Second wants, when the user click on the game which he want to play the Player.aspx page will open which consist iframe to open the game inside it
So I wanna the src of Iframe change dynamically depends on the game selected.
I hope it is clear info.