I am trying to put a path kept in a string variable (named "ruta") into the parameters of the swfobject.embedSWFfuntion but I don't know how to incorporate a c# code into javascript code. Can someone help me please?? thanks!!!!!
<%TarjetaPL tarjetaPl = null;
string ruta = null;
if (Session[Constantes.TarjetaSeleccionada] != null)
{
tarjetaPl = new TarjetaPL((Tarjeta)Session[Constantes.TarjetaSeleccionada]);
ruta = "../../content/images/" + tarjetaPl.TipoDeTarjeta.Banner;
}%>
<script type="text/javascript">
swfobject.embedSWF((HERE COMES THE PATH KEPT IN THE VARIABLE "ruta"), "flashBanner", "300", "120", "9.0.0");
</script>
The problem is that the code doesn't even recognize the " <% %> " tag to incorporate c# on it!