Urrrrrrrrrrrrrrrrrrgggggggggggggggggghhhhh! <script>, Verio, tech support!!! ---

T

Tom Carter

Hi all,

I am configuring a site hosted by Verio (Bronze level) so I am
using an ACCESS file to login to a protected section of my site.
Problem is that the event handlers do not seem to be firing when I use
my <script> block.

Here's the )&&*$)W(@&#$%@#^ Code. I really am getting pissed about
getting tech support in India that amounts to sorry can't help you.
Please lend a hand if anything springs right out -- I don't think I
have the power to make them re-register their ASP.NET. I also find
that the <%%> bracketed code runs just fine.

I will save the outsource rant for another post because I need
some help now, thanks in advance if anyone can help me figure this
out...

Tom C.
;-(



<%@ Page language="c#" AutoEventWireup="true" EnableViewState="true"
%>
<%@ Import Namespace = "System.Web.Security" %>
<%@ Import Namespace = "System" %>
<%@ Import Namespace = "System.Data.OleDb" %>
<%@ Import Namespace = "System.Data" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Staff Login Page</title>
<meta name="GENERATOR" Content="Microsoft FrontPage 5.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<script runat=server language=c#>
void btnLogon_Click(object sender, System.EventArgs e)
{
//this.lblMessage.Text = "Button Clicked..";
//Response.Write(@"<script language=javascript>alert('reached this
point')</" + @"script>");
if (VerifyPassword(txtUsername.Text ,txtPassword.Text ))
{
Server.Transfer ("pa.aspx");
}
//FormsAuthentication.RedirectFromLoginPage(Session["uname"].ToString(),false);
}

bool VerifyPassword(string suppliedUserName,string suppliedPassword
)
{
bool passwordMatch = false;
OleDbConnection myConn = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
Server.MapPath ("/../fpdb/websignals.mdb") + ";");
myConn.Open();

OleDbCommand OleDbCmd = new OleDbCommand("select login,password
from profiles where login = '" + suppliedUserName + "' and password =
'" + suppliedPassword + "'",myConn);
OleDbDataReader myreader = OleDbCmd.ExecuteReader();
if (myreader.HasRows)
{
Session["uname"] = myreader["login"].ToString();
Session["pwd"] = myreader["password"].ToString();
Session["validated"] = "true";
Response.Write ("DEBUG: " + Session["uname"].ToString() +
Session["pwd"].ToString());
}

myreader.Close();
myConn.Close();

if (Session["validated"].ToString() == "true") {passwordMatch =
true;}
return passwordMatch;
}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout"
onload="javascript:document.Form1.txtUsername.focus();">
<%
if (Session["uname"] == null)
{
Response.Write ("<script language=javascript> alert('" + " Site is
being configured, Please try again later." + @"')</" + @"script>");
}
%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top