Dear Experts,

Thanks for your time and help.
I am using oracle in my application with ASP.NET and C#,
My query is ok but it is going to ELSE Condition.
(Goes to green line)
Please Help me to solve this issu.

<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<%@ Import Namespace="Encryption"%>
<%
string rno=Request.QueryString["row_no"];
string pass=Request.Form["pass"];
pass=Encrypt.EncryptText(pass);
//   Response.Write(Encrypt.DecryptText("ëáëáìá"); 
OleDbConnection conn=new OleDbConnection(System.Configuration.ConfigurationManager.AppSettings["MM_CONNECTION_STRING_ictmdb"]);
conn.Open();
//OleDbCommand comm=new OleDbCommand("select count(*) cc from ictm_pass where password='"+pass+"'",conn);
OleDbCommand  comm = new OleDbCommand("select count(*)cc from ictm_new_company where password='" + pass + "'", conn);
OleDbDataReader dr=null;
bool delete=false;
try{dr=comm.ExecuteReader();
	if(dr.Read()){
		int cc=0;
		cc=Convert.ToInt32(dr["cc"]);
		dr.Close();
		Response.Write( "<Br>");
        
		if(cc>0) {
            
			// comm=new OleDbCommand("company.delete_registered_company",conn);
			// comm.CommandType=CommandType.StoredProcedure;
			OleDbParameter prm=comm.Parameters.Add("@row_no",OleDbType.Double);
			prm.Value=rno;
			comm.ExecuteNonQuery();
			delete=true;
		}
	}
}catch(Exception ex){Response.Write(ex.ToString()+"<br>");}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<link href="../../../../../css/ee.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<table width="600" border="0" cellpadding="4" cellspacing="2">
<tr>
  <td class="head importantdata">Deletion of Company Registration.</td>
</tr>
<tr>
  <td class="data"><%if(delete){%>
The Company <%=Request.QueryString["company_name"]%> is deleted.
<%}else{%>
The Company <%=Request.QueryString["company_name"]%> is not deleted because the password is wrong.<%}%>

</td>
  </tr>
</table>
</body>
</html>
<script type="text/javascript">
window.opener.window.location.href='../comp1.aspx';
</script>
<%
conn.Close();
%>

Edited 4 Years Ago by naveedqadri: formating

Yes, in this file you can see

OleDbParameter prm=comm.Parameters.Add("@row_no",OleDbType.Double);
			prm.Value=rno;
			comm.ExecuteNonQuery();
			delete=true;

Another thing i notice ,it does not getting "company_name" from previous page , I am sending two pages which are directly related to this last page.
Firt page (we select Delete Button)

<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="iso-8859-1" %> <%@ Import Namespace="System" %>
<%@ Import Namespace="System.IO" %> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.OleDb" %>
<%@ Register TagPrefix="auth" Namespace="ICTMLogging" Assembly="ictmlogging" %> <%@ Import Namespace="ICTMLogging" %>
<%
ICTMLogging log=null;

try{log=(ICTMLogging)Session.Contents["log"];}catch(Exception ex){
	Console.Write(ex.ToString());
}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >
<html>

<head>
<title>Waiting</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../../../../CSS/ee.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	background-color: #FFFFFF;
}
//-->
</style>
<script type="text/javascript" src="../../../../js/validation.js"></script>
<%
OleDbConnection conn=new OleDbConnection(System.Configuration.ConfigurationManager.AppSettings["MM_CONNECTION_STRING_ictmdb"]);
conn.Open();
//OleDbDataAdapter adp = new OleDbDataAdapter("select * from ictm_new_company order by row_no desc", conn);
OleDbDataAdapter adp = new OleDbDataAdapter("select * from ictm_new_company where comp_id is not null order by row_no desc", conn);
DataSet ds=new DataSet();
adp.Fill(ds,"new");



string rno=Request.QueryString["row_no"];
try{
	if (rno==null){
		rno=ds.Tables["new"].Rows[0]["row_no"].ToString();
	}
}catch(Exception ex){if(log!=null) log.log(ex.ToString());
}
%>
</head>

<body>

<%
if (ds.Tables["new"].Rows.Count==0){
%> <br>
<br>
<br>
<br>
<br>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
	<tr>
		<td align="center">
		<table width="80%" border="3" cellpadding="5" cellspacing="0" bordercolor="#4293CE">
			<tr>
				<td class="head">
				<h4>Waiting Members.</h4>
				</td>
			</tr>
			<tr>
				<td class="data"><br>
				<blockquote>
					No Waiting Members.</blockquote>
				</td>
			</tr>
		</table>
		</td>
	</tr>
</table>
<%
Response.End();
}
%>
<p class="head_style">Waiting Members</p>
<%if (rno==""){%> There is no Waiting Members. <%
	Response.End();
}
DataRow[] drs=ds.Tables["new"].Select("row_no="+rno);
DataRow dr = null;
try { dr = drs[0]; }
catch { Response.Redirect("comp1.aspx"); }
string comp_name=dr["Company_name"].ToString();
string comp_id=dr["comp_id"].ToString();
string regno=dr["regno"].ToString();
string address_1=dr["address_1"].ToString();
string address_2=dr["address_2"].ToString();
string city=dr["city"].ToString();
string pin=dr["postal_code"].ToString();
string state=dr["state"].ToString();
string country=dr["country_code"].ToString();
string phone=dr["phone_no"].ToString();
string fax_no=dr["fax_no"].ToString();
string size=dr["employee_size_code"].ToString();
string nouid=dr["no_uids"].ToString();
string ty=dr["pack_type"].ToString();
string paid=dr["paid"].ToString();
string discount=dr["discount"].ToString();
string web=dr["website"].ToString();
string em=dr["email"].ToString();
string Industry = dr["Industry"].ToString();
string Sector = dr["Sector"].ToString();
string PP_OR_NRIC = dr["PP_OR_NRIC"].ToString();
string MR_Title = dr["MR_Title"].ToString();
// added by Naveed to check password leter delete it.                                                 
string pw = dr["password"].ToString();
bool isConsultant = true;
if (dr["type_account"].ToString() == "I") isConsultant = false;
string payment_status = "W";
   
adp=new OleDbDataAdapter("select * from ictm_country_code where code='"+dr["country_code"].ToString()+"'",conn);
adp.Fill(ds,"xx");
DataRow dr_coun=ds.Tables["xx"].Rows[0];
    
    
    adp = new OleDbDataAdapter("SELECT * FROM ICTM_PAYMENT  order by  PAY_ID desc", conn);
adp.Fill(ds, "payment");
DataRow[] dtPayment = null;
bool isPaidYes = false;	

try
{
    dtPayment = null;
    dtPayment = ds.Tables["payment"].Select("company_id='" + comp_id + "'");
}
catch (Exception ex) { Response.Write(ex.Message+"<br>"); }
  
if (dtPayment != null)
{
    if (dtPayment.Length > 0)
    {  
        payment_status = dtPayment[0]["status"].ToString();
        if (payment_status == "O" || payment_status == "A")
            isPaidYes = true;
     }
}


DataRow[] drbf=ds.Tables["new"].Select("row_no<"+rno);
DataRow[] draf=ds.Tables["new"].Select("row_no>"+rno);
draf=(draf.Length==0)?drs:draf;
drbf=(drbf.Length==0)?drs:drbf;
DataTable dttab=ds.Tables["new"];
%>
<form action="comp1.aspx" method="post" name="frm" id="frm" >
	<table border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td>
			<img src="/ictm/Images/buttons/Memb_3set/companydetails/companydetails-active.gif" border="0" alt=""></td>
			<td><a href="app.aspx?comp_id=<%=dr["comp_id"]%>">
			<img src="/ictm/Images/buttons/Memb_3set/companydetails/package-inactive.gif" alt="<%=(dr["pack_type"].ToString()=="N")?"Package Selection Not Done.":""%>" border="0"></a></td>
			<td><a href="payment.aspx?comp_id=<%=dr["comp_id"]%>">
			<img src="/ictm/Images/buttons/Memb_3set/companydetails/payments-inactive.gif" alt="<%=(dr["paid"].ToString()=="N")?"Payment Selection Not Done.":""%>" border="0"></a></td>
		</tr>
	</table>

	<!-- main table  -->
<table border="0" cellpadding="0" cellspacing="6" class="bgorng">
<tr>
<Td valign="top" align="left" nowrap="nowrap">
<table border="0" cellpadding="4" cellspacing="2" width="375">
<tr><td colspan="2" class="orng_head" align="center" valign="top" >Company Info</td>
</tr>
				<tr >
					<td  class="orng_sh" align="right" nowrap="nowrap">
					
						<span class="importantdata importantdata">Company Name
						</span>
					</td>
					<td  class="orng_data" nowrap="nowrap" align="left" width="250">
					<select name="rno" onchange="change_comp()"><%foreach(DataRow drw in ds.Tables["new"].Rows){%>
					<option value="<%=drw["row_no"]%>" <%=(drw["row_no"].ToString()==rno)?"selected":""%>>
					<%=drw["company_name"]%></option>
					<%}%></select> </td>
				</tr>
					<%if (isConsultant==false){%>
				<tr >
					<td  class="orng_sh" align="right" nowrap="nowrap">
					 
						<span class="importantdata"> Registration No. </span>
					</td>
					<td width="250"  class="orng_data" nowrap="nowrap" align="left"> <%=regno%>  </td>
				</tr>
				<%}%>
				<tr >
					<td  class="orng_sh" align="right" nowrap="nowrap" valign="top">
					 
						<span class="importantdata">Address</span>
					</td>
					<td  class="orng_data" nowrap="nowrap" align="left" width="250">
					<%=  address_1%><%=  address_1.Trim()!="" ?"<br>":""%>
				<%=  address_2 %><%=  address_2.Trim()!="" ?"<br>":""%>
			 	<%=  pin %> <%=  pin.Trim()!="" ?"&nbsp;":""%> 
			   	<%= city  %> <%= city.Trim()!="" || pin.Trim()!="" ?"<br>":""%>
			   	<%=  state %><%=  state.Trim()!="" ?",":""%>  	
			    <%=dr_coun["description"]%>
					<%--<%=address_1%><br><%=address_2%> <%=pin%> <%=city%> <br><%=state%>, <%=dr_coun["description"]%>--%>
					</td>
				</tr>
				<%if (isConsultant==false){%>
				<tr >
					<td   class="orng_sh" align="right" nowrap="nowrap">					 
						<span class="importantdata">Telephone No. </span> 
					</td>
					<td  class="orng_data" nowrap="nowrap" align="left" width="250"><%=phone%></td>
				</tr>
				<%}%>
				</table>
			</td>
			<td valign="top" style="width: 400px" align="left" nowrap="nowrap" >
			<table width="375" border="0" cellpadding="3" cellspacing="2">
			<tr><td colspan="2" class="orng_head" align="center">Company Portfolio
					 </td></tr>
				<tr >
					<td  class="orng_sh" align="right" nowrap="nowrap" width="125">
					
						<span class="importantdata">Web Site </span>
					</td>
					<td  class="orng_data" align="left" nowrap="nowrap" width="250">
					<a href="<%=web%>" target="_blank"><%=web%>&nbsp;</a></td>
				</tr>
				<tr >
					<td  class="orng_sh" align="right" nowrap="nowrap" width="125">
					
						<strong>Industry</strong>
					</td>
					<td  class="orng_data" align="left" nowrap="nowrap" width="250"><%= Industry%>&nbsp;</td>
				</tr>
				<tr style="height:30px ">
					<td class="orng_sh" style="text-align: right" nowrap="nowrap" width="125"><strong>Sector</strong></td>
					<td class="orng_data" align="left" nowrap="nowrap" height="29" width="250"><%=Sector  %>&nbsp;</td>
				</tr>
					<%if (isConsultant==false){%>
				<tr >
					<td width="125"  class="orng_sh" align="right" nowrap="nowrap">
					
						<span class="importantdata"> Size of Company </span>
					</td>
					<td width="250"  class="orng_data" align="left" nowrap="nowrap">
					<%
                                                                       int xsize = 1;            
			
	
		try{
			xsize=Convert.ToInt32(size);
		}catch(Exception ex){if(log!=null) log.log(ex.ToString());
		}
		switch(xsize){
			case 1: Response.Write("0-50");break;
			case 2: Response.Write("51-100");break;
			case 3: Response.Write("101-150");break;
			case 4: Response.Write("151-200");break;
			case 5: Response.Write("201-250");break;
			case 6: Response.Write("More than 251");break;
		}%> Employees  </td>
				</tr>
				<%} %>
				<tr >
					<td  class="orng_sh" align="right" nowrap="nowrap" width="125">
					
						<span class="importantdata">No. of User Ids </span>
					
					</td>
					<td  class="orng_data" align="left" nowrap="nowrap" width="250"><%=   (isConsultant)? "2":"15"           %>
					<%
                                                           
        // try{
        //    xsize=Convert.ToInt32(nouid);
        //}catch(Exception ex){if(log!=null) log.log(ex.ToString());
        //}
        //switch(xsize){
        //    case 1: Response.Write("0-5");break;
        //    case 2: Response.Write("6-10");break;
        //    case 3: Response.Write("11-15");break;
        //    case 4: Response.Write("16-20");break;
        //    case 5: Response.Write("21-25");break;
        //    case 6: Response.Write("More than 25");break;
        //}
				                               
				                                                       %></td>
				</tr>
			</table>
			<p class="com_data">&nbsp;</p>
			</td>
		</tr>
		<tr>
			<td valign="top" style="width: 400px" align="left" nowrap="nowrap" valign="top"  >
			<table width="375" border="0" cellpadding="3" cellspacing="2">
				<tr>
					<td colspan="2" class="orng_head" align="center">Contact 
					Details</td>
				</tr>
				<tr>
					<td width="125" class="orng_sh" nowrap="nowrap" align="right">Contact Person</td>
					<td width="250" class="orng_data" align="left" nowrap="nowrap"><%=MR_Title + " " + dr["person"]%></td>
				</tr>
				<tr>
					<td class="orng_sh" nowrap="nowrap" align="right" width="125"><strong><%if (PP_OR_NRIC == "P")
				    {%> Passport No. <%
                    }else{%> NRIC No. <%} %> </strong></td>
					<td class="orng_data" align="left" nowrap="nowrap" width="250"><%=dr["passport"]%>
					</td>
				</tr>
				<%if (isConsultant==false){%>
				<tr>
					<td class="orng_sh" nowrap="nowrap" align="right" width="125">Designation</td>
					<td class="orng_data" align="left" nowrap="nowrap" width="250"><%=dr["designation"]%></td>
				</tr>
				<%}%>
				<tr>
					<td class="orng_sh" nowrap="nowrap" align="right" width="125">Telephone No.</td>
					<td class="orng_data" align="left" nowrap="nowrap" width="250"><%=phone%></td>
				</tr>
				<tr>
					<td class="orng_sh" nowrap="nowrap" align="right" width="125">Fax No.</td>
					<td class="orng_data" align="left" nowrap="nowrap" width="250"><%=dr["Per_faxno"]%></td>
				</tr>
				<tr>
					<td class="orng_sh" nowrap="nowrap" align="right" width="125">Email Id</td>
					<td class="orng_data" align="left" nowrap="nowrap" width="250">
					<a href="mailto:<%=dr["per_email"]%>"><%=dr["per_email"]%></a></td>
				</tr>
			</table>
			</td>
			<td valign="top" style="width: 400px" align="left" nowrap="nowrap" valign="top"  >
			<table width="375" border="0" cellpadding="3" cellspacing="2" >
				<tr>
					<td colspan="2" class="orng_head" align="center">Administration Details</td>
				</tr>
				<tr>
					<td width="125" class="orng_sh" align="right" nowrap="nowrap">Company Id
					</td>
					<td class="orng_data" style="width: 250px" align="left" nowrap="nowrap">
					<span class="com_data"><%=comp_id%></span> </td>
				</tr>
				<tr>
					<td class="orng_sh" align="right" nowrap="nowrap" width="125">Login Id </td>
					<td class="orng_data" style="width: 250px" align="left" nowrap="nowrap"><%=dr["user_id"]%></td>
				</tr>
                <tr>
                     <td class="orng_sh" align="right" nowrap="nowrap" width="125">Current Password </td>
                     <td class="orng_data" style="width: 250px" align="left" nowrap="nowrap"><%=pw %></td>
                </tr>
				<tr>
					<td class="orng_sh" align="right" nowrap="nowrap" width="125">Password </td>
					<td class="orng_data" style="width: 250px" align="left" nowrap="nowrap"> 
					<a href="javascript:resetpass('<%=rno%>')">Reset Password
					 </a></td>
				</tr>
				<tr>
					<td class="orng_sh" align="right" nowrap="nowrap" width="125"><strong>Account Type</strong></td>
					<td class="orng_data" style="width: 250px" align="left" nowrap="nowrap"><%=isConsultant? "Consultant" : "Company"%></td>
				</tr>
				<tr>
					<td class="orng_sh" align="right" nowrap="nowrap" width="125"><strong>Status</strong></td>
					<td class="orng_data" style="width: 250px" align="left" nowrap="nowrap"><%
                    switch (dr["Approvalstatus"].ToString())
                    {
                        
                        case "P":
                            Response.Write("Waiting");
                            break;
                        case "T":
                            Response.Write("Trial Period selected");
                            break;

                        case "M":
                            Response.Write("Payment Mode selected");
                            break;
                        case "C":
                            Response.Write("Consultant Mode selected");
                            break;
                        default :
                            Response.Write("Waiting");
                            break;
                    }				
				
				%> </td>
				</tr>
				<%--payment_status--%> <%
                if (dr["Approvalstatus"].ToString() == "M")
                {  
 			
				%>
				<tr>
					<td class="orng_sh" align="right" nowrap="nowrap" width="125"><strong>Payment Status</strong></td>
					<td class="orng_data" style="width: 250px" align="left" nowrap="nowrap"><%
                    switch (payment_status)
                {

                    case "W":  Response.Write("Waiting for Check"); break;
                    case "R":  Response.Write("Check Received & Processing"); break;
                    case "O":  Response.Write("Check(s) Cleared"); break;
                    case "A":  Response.Write("Payment Accepted"); break;


                }
				
				
				
				%> </td>
				</tr>
				<%} %>
			</table>
			</td>
		</tr>
		
		<tr>
			<td colspan="0" align="left" width="400" nowrap="nowrap" >
			
			<table  width="375"   border="0"  cellpadding="3" cellspacing="2">
				<tr>
					<td colspan="2" class="orng_head" align ="center">
					<string >
						Status</string>
					</td>
				</tr>
				<tr>
					<td bgcolor="#FFFF66" class="orng_sh" align="right" nowrap="nowrap" width="125">
					<div class="orng_sh">
						Registration:
					</td>
					<td width="250" align="left"  class="orng_data" nowrap="nowrap">
					<%if(dr["checked"].ToString()=="Y"){%> Checked <%}else if(dr["checked"].ToString()=="N"){%> 
					Unchecked <%}else{%> Canceled <%}%> .&nbsp; </td>
				</tr>
				<tr>
					<td class="orng_sh" nowrap="nowrap" align="right" width="125">
					<div align="right" class="importantdata">
						Package Selection: 
					</td>
					<td  class="orng_data" nowrap="nowrap" align="left" width="250"><% if(dr["pack_type"].ToString()=="N"){%> 
					Not <%}%>Done.</td>
				</tr>
				<tr>
					<td class="orng_sh" align="right" nowrap="nowrap" width="125">Payment </td>
					<td  class="orng_data" nowrap="nowrap" align="left" width="250"><% if(dr["paid"].ToString()=="N"){%>Not<%}%> 
					Done. </td>
				</tr>
				<tr>
					<td class="orng_sh" nowrap="nowrap" align="right" width="125">
					<div align="right" class="importantdata">
						<a href="javascript:discount()">Discount:</a>
					</td>
					<td  class="orng_data" nowrap="nowrap" align="left" width="250"><%=dr["discount"]%> 
					%</td>
				</tr>
			</table>
			
			
			
		</td>
			<td colspan="0" align="left" width="375" nowrap="nowrap" valign="top" >
			
			<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0">
				<tr>
					<td>
					<input name="Check" type="button" id="Check" value="Cancel Registration" style="width:184px ; height: 18px;" onclick="can('<%=dr["row_no"]%>','<%=dr["company_name"]%>','<%=dr["comp_id"]%>')">
					</td>
				</tr>
				<%if (dr["Approvalstatus"].ToString()=="T"){ %>
				<tr>
					<td>
					<input name="Check" type="button" id="Button2" value="Activate Trial Period" style="width:184px ; height: 18px;" onclick="act(1)">
					 </td>
				</tr><%} %> 
				<%if ((dr["Approvalstatus"].ToString() == "M" && isPaidYes) || dr["Approvalstatus"].ToString() == "C")

                                    { %>
				<tr>
					<td style="height: 22px">
                        
					<input name="Activate" type="button" id="Activate" value="Activate Membership" style="width:184px ; height: 18px;" onclick="act('<%= dr["Approvalstatus"].ToString() == "C" ?"3":"2" %>')">
					 </td>
				</tr><%
                    
                    
                  } %>
				<tr>
					<td>
					<input type="button" name="Submit" value="Delete This Company"  onclick="DeleteCompany()" id="Button1">
					</td>
				</tr>
			</table>
			
			
		 
		</td></tr>
		
	</table>
</form>

</body>

</html>
<script type="text/javascript">
function discount(){
	var dis=prompt('Amount of Discount[0-100]','<%=dr["discount"]%>');
	if (dis==null){
		return ;
	}
	dis=dis-0;
	if (dis<0 || dis >100 ){
		alert('Invalid Discount. \nDiscount Should be Between 0 to 100');
		return ;
	}
	window.open('discount.aspx?row_no=<%=dr["row_no"]%>&dis='+dis,'MyWin','toolbar=0,menubar=0,width=300,height=75');	
}
function act(t){
    var currentTime =null;
//    if (t=='1')
//      currentTime=  currentTime + 30 ;
//    else 
//      currentTime=  currentTime + 180 ;

//    if (t=='1')
//       currentTime = new Date() +30;
//    else  
//         currentTime = new Date() +180;
//       
//       
//    var month = currentTime.getMonth()  ;
//    var day = currentTime.getDate();
//    var year = currentTime.getFullYear();

    var dis = 'Trail Period';
    if (t=='1')
        dis = 'Trail Period';
    else if (t=='2')
        dis='Member Subscrption';
    else  if (t=='3')
        dis='Consultant';
     
    
    if(window.confirm('Sure to activate '+ dis +'?'))
	window.location.href='act.aspx?comp_id=<%=dr["comp_id"]%>&acctivation_type='+t;	
}

function check(t,t1,t2){
	window.open('cname.aspx?rno='+t+'&cname='+t1+'&cid='+t2,'MyWin','toolbar=0,menubar=0,width=300,height=150');
}
function can(t,t1,t2){
	window.open('cancelreg.aspx?rno='+t+'&cname='+t1+'&cid='+t2,'MyWin','toolbar=0,menubar=0,width=300,height=150');
}
function trial_fn(t,t1,t2){
	window.open('trial.aspx?rno='+t+'&cname='+t1+'&cid='+t2,'MyWin','toolbar=0,menubar=0,width=300,height=150');
}
function resetpass(t){
window.open('pass.aspx?rno='+t,'MyWin','toolbar=0,menubar=0,width=300,height=150');
}
function change_comp(){
	var chk=document.getElementById('rno');
	window.location.href='comp1.aspx?row_no='+chk.value;
}
function DeleteCompany(){
	if(window.confirm('Do you want to Delete This Company Registration?'))
		window.open('password/company_delete.aspx?row_no=<%=rno%>','MyWi','width=400,height=200');
	 
 
}
</script>
<%
conn.Close();
%>

Delete.aspx

<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<link href="../../../../../css/ee.css" rel="stylesheet" type="text/css"/>
<style type="text/css">
.style1 {color: #FF0000}
</style>
</head>
<body><br/>
<form  id="frm" action="company_delete_save.aspx?row_no=<%=Request.QueryString["row_no"]%>" method="post">
    <table width="338" border="0" cellpadding="3" cellspacing="0">
      <tr>
        <td colspan="2" nowrap="nowrap" class="pink2"><span class="head_style">Password for Deletion</span></td>
      </tr>
      <tr>
        <td width="94" nowrap="nowrap" class="pink2">Password</td>
        <td width="244" nowrap="nowrap" class="pink4"><input type="password" id="pass" name="pass" /></td>
      </tr>
	  <tr><td colspan="2" class=" style1" style="height: 63px">Password is necessary for Deleting a company detail from the database. After removal of company detail it cannot be retrieved back.&nbsp;</td>
	  </tr>
      <tr>
        <td colspan="2" nowrap="nowrap">
        <table border="0" cellspacing="0" cellpadding="3">
          <tr >
            <td ><input type="submit" value="Delete"  onclick="return ConfirmDelete()" id="Submit1"/></td>
            <td style="width: 79px"><input type="button" value="Cancel" /> &nbsp;</td>
          </tr>
        </table></td>
      </tr>
    </table>
</form>

</body>
</html>
<script type="text/javascript">
function ConfirmDelete(){
var chr=document.getElementById('pass');
if(chr.value==''){
	alert('Password cannot be Empty');
	return false;
}
if(window.confirm('Do you want to delete?'))
	return true;
return false;
}
</script>

These are three pages , which do delete company , but I am unable to delete
Your help is appriciated

This article has been dead for over six months. Start a new discussion instead.