Lot's of LIVE projects available here. Welcome to SMI Studio We Provide Best Software Solutions using Latest Technology with Design, Developement, Testing and Maintenance. RAD with Agile Methodology. We developed many kinds of Applications & Works on lot of programming languages and Technologies like Angular, ASP.Net, C#.Net, Web API, Node npm, PHP, JSP, MVC.Net, jQuery, Bootstrap, HTML/CSS/ javaScript. Awesome various types of database MS SQL Server, Firebase, MariyaDB.
imgbtn I ASP.NET C# | Image Button Properties | SMI Studio
using System;
using System.Web.UI;
using System.Drawing;
namespace WebApplication4
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
if (e.X >= 0 && e.X < (imbtn.Width.Value/2))
{
if (e.Y >= 0 && e.Y < (imbtn.Height.Value / 2))
{
lbl.ForeColor = Color.Yellow;
lbl.Text = "you cicked on yellow button";
}
else
{
lbl.ForeColor = Color.Red;
lbl.Text = "you cicked on RED button";
}
}
else
{
if (e.Y >= 0 && e.Y < (imbtn.Height.Value / 2))
{
lbl.ForeColor = Color.Blue;
lbl.Text = "you cicked on BLUE button";
}
else
{
lbl.ForeColor = Color.Green;
lbl.Text = "you cicked on GREEN button";
}
}
}
}
}