I need to change the image (SVG) that is on the page in a object container by selecting another item within dropdownlist. It has to be in the CodeBehind, using the OnSelectedIndexChanged event. By default it loads the image.svg, but when selecting another dropdownlist item it would have to change, loading another image that is stored in the same directory.
The code of the aspx is:
<td class="auto-style24" style="vertical-align: top;">
Punto de Medición<br />
<asp:DropDownList ID="DDLPuntoMedicion" runat="server" DataSourceID="EDFPtoMedicion" DataTextField="Nombre" DataValueField="Id" Width="150px" Height="25px" OnPreRender="DDLPuntoMedicion_PreRender" AutoPostBack="True" OnSelectedIndexChanged="DDLPuntoMedicion_SelectedIndexChanged">
</asp:DropDownList>
</td>
<td >
</td>
</tr>
<tr>
<td class="auto-style24" style="vertical-align: top; text-align: center;">
<object id="diagrama" type="image/svg+xml" data="Imagen/Imagen.svg" style="border: medium ridge #C0C0C0; width: auto; height: 480px;"></object>
</td>
<td >
The code in C # should be inside:
protected void DDLPuntoMedicion_SelectedIndexChanged(object sender, EventArgs e)
{
}