How to set Url Iframes Based on Dropdownlist

Jayakumars
Posted by Jayakumars under ASP.NET AJAX category on | Points: 40 | Views : 1108
Hi
I have post the Code.How to set Url Iframes Based on Dropdownlist


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script>
function AssignIframe() {
document.getElementById("<%= Ifrm1.ClientID %>").src = "http://www.indiabix.com/technical/dotnet/asp-dot-net/";
document.getElementById("<%= Ifrm2.ClientID %>").src = "http://www.codeproject.com/Articles/28892/Asp-Net-Interview-Question-Part-1";
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:DropDownList ID="DrpRedirect" runat ="server" onchange="AssignIframe();">
<asp:ListItem Text ="http://www.indiabix.com/technical/dotnet/asp-dot-net/" Value ="1"></asp:ListItem>
<asp:ListItem Text ="http://www.codeproject.com/Articles/28892/Asp-Net-Interview-Question-Part-1" Value ="2"></asp:ListItem>
</asp:DropDownList>


<iframe id="Ifrm1" runat ="server" >
</iframe>

<iframe id="Ifrm2" runat ="server" >
</iframe>

</form>
</body>
</html>

Comments or Responses

Login to post response