web 2.0

ASP.NET(vb.net) & HTMLInputImage

ASP.NET(vb.net) & HTMLInputImage - HTMLInputImage : Creates a server-side control that maps to the <input type=image> HTML element and allows you to create an button that displays an image

ShotDev Focus:
- ASP.NET(vb.net) & HTMLInputImage

ASP.NET(vb.net) & HTMLInputImage

Tag Control :

<input type=image
id="programmaticID"
src="imagepath"
align="imagealignment"
alt="alttext"
OnServerClick="onserverclickhandler"
width="borderwidthinpixels"
runat="server" >

Example

HTMLInputImage.aspx

<%@ Page Language="VB" %>
<script runat="server">

Sub Page_Load(sender As Object,e As EventArgs)
IF NOT Page.IsPostBack() Then
Me.InputImage1.Src = "images/mygirl.jpg"
Me.InputImage1.Alt = "My Girl"
Me.InputImage1.Style.Add("Width","200px")
End IF
End Sub

Sub Image_OnClick(sender As Object, e As ImageClickEventArgs)
Me.InputImage1.Src = "images/mygirl2.jpg"
Me.InputImage1.Alt = "My Girl"
Me.InputImage1.Style.Add("Width","200px")
End Sub

</script>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<form runat="server">
<input type="image" id="InputImage1" OnServerClick="Image_OnClick" runat="server">
<hr />
<asp:Label id="lblText1" runat="server"></asp:Label>
</form>
</body>
</html>

Screenshot

ASP.NET(vb.net) & HTMLInputImage
.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.