Hello, I have following jsp page which will simply make use of the ImageUrl in the program for setting imageUrl in asp:
HTML Code:
<%@ Page Language="VB" %>
<script runat="server">
Sub b1_Click(sender As Object, e As EventArgs)
l3.Visible = False
l1.Text = Int(Rnd() * 6) + 1
l2.Text = Int(Rnd() * 6) + 1
img2.ImageUrl = "http://www.techarena.in/style/design.png"
img3.ImageUrl = "http://www.techarena.in/style/design.png"
If l1.Text = "1" And l2.Text = "1" Then
l5.Text = l4.Text
If CInt(l5.Text) > CInt(l6.Text) Then
l6.Text = l5.Text
Panel1.Visible = True
End If
l4.Text = 0
l3.Visible = True
Else
l4.Text = CInt(l4.Text) + CInt(l1.Text) + CInt(l2.Text)
End If
End Sub
Sub b2_Click(sender As Object, e As EventArgs)
l6.Text = 0
End Sub
Sub b3_Click(sender As Object, e As EventArgs)
Panel1.Visible = False
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<p>
<asp:Label id="l1" runat="server" Height="44px" Font-Size="X-Large" Font-Names="Verdana" BorderStyle="Solid">0</asp:Label>
<asp:Label id="l2" runat="server" Height="44px" Font-Size="X-Large" Font-Names="Verdana" BorderStyle="Solid">0</asp:Label>
</p>
<p>
<asp:Image id="img2" runat="server"></asp:Image>
<asp:Image id="img3" runat="server"></asp:Image>
</p>
<p>
<asp:Label id="l3" runat="server" Visible="False">Ooops, you did it again :(</asp:Label>
</p>
<p>
<asp:Button id="b1" onclick="b1_Click" runat="server" Text="Click on it..."></asp:Button>
</p>
<p>
<asp:Label id="l4" runat="server" Font-Size="X-Large" Font-Names="Verdana" ForeColor="Red">0</asp:Label>
</p>
<p>
Last Score:
<asp:Label id="l5" runat="server" Font-Size="X-Large" Font-Names="Verdana" ForeColor="Red">0</asp:Label>
</p>
<p>
High Score:
<asp:Label id="l6" runat="server" Font-Size="X-Large" Font-Names="Verdana" ForeColor="Red">0</asp:Label>
</p>
<p>
<asp:Button id="b2" onclick="b2_Click" runat="server" Text="Reset High Scores"></asp:Button>
</p>
<p>
<asp:Panel id="Panel1" style="Z-INDEX: 100; LEFT: 192px; POSITION: absolute; TOP: 421px" runat="server" Visible="False">
<p>
Ok, now submit.
</p>
<p>
Name:
<asp:TextBox id="TextBox1" runat="server"></asp:TextBox>
</p>
<p>
E-mail:
<asp:TextBox id="TextBox2" runat="server"></asp:TextBox>
</p>
<p>
<asp:Button id="b3" onclick="b3_Click" runat="server" Text="submit"></asp:Button>
</p>
</asp:Panel>
</p>
</form>
</body>
</html>
Bookmarks