Hi Vinodkumar,
I have modified code as per your requirement:
This is HTML code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ZTest2.aspx.cs" Inherits="ZTest2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<script language="javascript" type="text/javascript">
alert('Invalid Email or Password!');
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="fr">
<div class="loginbox">
<div class="loginboxbg">
<div class="ltop">
<div class="bleft">
<div class="bright">
<div style="padding: 5px 10px; height: 20px;" class="arial15">
<strong>MEMBERS LOGIN</strong>
</div>
<div style="padding: 5px 10px;">
<form action="http://208.101.14.59/sms/php/pass.php?go=login" method="post" name="form"
id="form">
<div>
<div class="fl" style="width: 155px;">
Login Email:</div>
<div class="fl" style="width: 20px;">
</div>
<div class="fl" style="width: 106px;">
Password :</div>
<div class="clear">
</div>
</div>
<div>
<div class="fl" style="width: 155px;">
<asp:TextBox runat="server" ID="txtEmail" CssClass="box1"></asp:TextBox>
</div>
<div class="fl" style="width: 20px;">
</div>
<div class="fl" style="width: 106px;">
<asp:TextBox runat="server" ID="txtPassword" CssClass="box2" TextMode="Password"></asp:TextBox>
</div>
<div class="fl">
<asp:ImageButton runat="server" ID="ibtnLogin" ImageUrl="mages/loginbutt.jpg"
AlternateText="Click to login" onclick="ibtnLogin_Click" />
</div>
<div class="clear">
</div>
</div>
</form>
</div>
<div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</body>
</html>
This is server side code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class ZTest2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ibtnLogin_Click(object sender, ImageClickEventArgs e)
{
if (txtEmail.Text == "Imdadhusen.sunasara@gmail.com" && txtPassword.Text == "Imdad")
{
Response.Redirect("ProductHome.aspx");
}
else
{
string strMessage = @" <script language='javascript' type='text/javascript'>
alert('Invalid Email or Password!');
</script>";
Response.Write(strMessage);
}
}
}
Please do let me know, if you have any doubt.
Please provide
Vote if this would be helpful to you.
Thanks,
Imdadhusen