473,671 Members | 2,327 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp.net button does not work

Weird thing:

Got an aspx page with a button and an associated code in VB.net.
On my testing server the page works fine.
On the old hosters server the page worked fine too.
But now, at the new hoster it does not.

When I click on the submit button: nothing happens.
The only thing that works is form validation.

I pasted the code below.
It's a login page, but I added this in the code to be sure that the problem
is on this page:
response.write( "ok1")
So even this ok1 does not appear.
In fact, when I click on the button, the page is not posted.

Could it be a setting at the hosters server. The hoster says asp.net
scripting is active for the whole site.
PS: other aspx pages on the same website with buttons etc do work at that
hoster.
I really don't get it.

THX for help !

############### ######## CODE START ############### ########

<%@ Page Language="VB" ContentType="te xt/html" ResponseEncodin g="iso-8859-1"
%>
<%@ Register TagPrefix="MM" Namespace="Drea mweaverCtrls"
Assembly="Dream weaverCtrls,ver sion=1.0.0.0,pu blicKeyToken=83 6f606ede05d46a, c
ulture=neutral" %>
<MM:DataSet
id="dsusers"
runat="Server"
IsStoredProcedu re="false"
ConnectionStrin g='<%#
System.Configur ation.Configura tionSettings.Ap pSettings("MM_C ONNECTION_STRIN G
_connusers") %>'
DatabaseType='< %#
System.Configur ation.Configura tionSettings.Ap pSettings("MM_C ONNECTION_DATAB A
SETYPE_connuser s") %>'
CommandText='<% # "SELECT * FROM tbl_users WHERE user_name = ? AND
user_password = ?" %>'
Debug="true"
<Parameters>

<Parameter Name="@user_nam e" Value='<%# IIf((Request.Fo rm("user_name" )
<> Nothing), Request.Form("u ser_name"), "") %>' Type="WChar" />
<Parameter Name="@user_pas sword" Value='<%#
IIf((Request.Fo rm("user_passwo rd") <> Nothing),
Request.Form("u ser_password"), "") %>' Type="WChar" />
</Parameters></MM:DataSet>
<MM:PageBind runat="server" PostBackBind="t rue" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>LOGIN</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="backoffic e.css" rel="stylesheet " type="text/css">
</head>
<body>
<p>&nbsp;</p>
<p>&nbsp;</p>
<form method="POST" enctype="applic ation/x-www-form-urlencoded" id="form1"
runat="server">
<table width="379" height="379" border="0" align="center"
background="ima ges/selfmanager.jpg " class="tblresul ts">
<tbody>
<tr>
<td height="190" valign="bottom" ><div align="center"> <strong>
</strong></div></td>
</tr>
<tr>
<td><div align="center" class="style1">
</div></td>
</tr>
<tr>
<td><div align="center"> </div></td>
</tr>
<tr>
<td bgcolor="#FFFFF F"><div align="center" class="style3"> <span
class="style1"> <span class="style2">
<asp:Label ID="txt_failed " runat="server" />
</span></span>Gebruikers naam:</div></td>
</tr>
<tr>
<td>
<div align="center">
<asp:TextBox id="user_name" runat="server"> </asp:TextBox>
<asp:RequiredFi eldValidator ID="RequiredFie ldValidator1"
EnableClientScr ipt="true" Display="Dynami c" ErrorMessage="V erplicht"
ControlToValida te="user_name" runat="server"> </asp:RequiredFie ldValidator>
</div></td>
</tr>
<tr>
<td bgcolor="#FFFFF F"><div align="center"
class="style3"> Wachtwoord:</div></td>
</tr>
<tr>
<td>
<div align="center">
<asp:TextBox ID="user_passwo rd" runat="server" TextMode="Passw ord"
/>
<asp:RequiredFi eldValidator ID="RequiredFie ldValidator2"
EnableClientScr ipt="true" Display="Dynami c" ErrorMessage="V erplicht"
ControlToValida te="user_passwo rd"
runat="server"> </asp:RequiredFie ldValidator>
</div></td>
</tr>
<tr>
<td><div align="center"> </div></td>
</tr>
<tr>
<td>
<div align="center">
<asp:Button ID="submit" OnClick="onlogi n" runat="server"
Text="LOG-IN"></asp:Button>
</div></td>
</tr>
<tr>
<td>
<div align="center">
<script runat="server">
sub onlogin (sender As Object, e As System.EventArg s)
response.write( "ok1")
if dsusers.recordc ount > 0 then
Formsauthentica tion.redirectfr omloginpage("ba ckoffice", true)
response.redire ct("/backoffice/accesslevel1/index.aspx")
else if ((request.form( "user_password" )))<> nothing OR
((request.form( "user_name" ))) <> nothing
txt_failed.text ="Login MISLUKT. Probeer opnieuw."
end if
end sub
</script>

</div></td>
</tr>
</tbody>
</table>

</form>
</body>
</html>
############### ######## CODE END ############### ########
Nov 19 '05 #1
4 2996
Copy the aspnet_client folder (I think thats the name) from the root
directory of your web server ( c:\Inetpub\wwwr oot\aspnet_clie nt) to the root
directory of your webfolder on the server. That should get this working.
This is a bug in the .net 1.1. See article below. Your hosting admins
would need to follow whats is the document to prevent this.
http://support.microsoft.com/?kbid=889877

"nicholas" <mu********@hot mail.com> wrote in message
news:ec******** ******@tk2msftn gp13.phx.gbl...
Weird thing:

Got an aspx page with a button and an associated code in VB.net.
On my testing server the page works fine.
On the old hosters server the page worked fine too.
But now, at the new hoster it does not.

When I click on the submit button: nothing happens.
The only thing that works is form validation.

I pasted the code below.
It's a login page, but I added this in the code to be sure that the
problem
is on this page:
response.write( "ok1")
So even this ok1 does not appear.
In fact, when I click on the button, the page is not posted.

Could it be a setting at the hosters server. The hoster says asp.net
scripting is active for the whole site.
PS: other aspx pages on the same website with buttons etc do work at that
hoster.
I really don't get it.

THX for help !

############### ######## CODE START ############### ########

<%@ Page Language="VB" ContentType="te xt/html"
ResponseEncodin g="iso-8859-1"
%>
<%@ Register TagPrefix="MM" Namespace="Drea mweaverCtrls"
Assembly="Dream weaverCtrls,ver sion=1.0.0.0,pu blicKeyToken=83 6f606ede05d46a, c
ulture=neutral" %>
<MM:DataSet
id="dsusers"
runat="Server"
IsStoredProcedu re="false"
ConnectionStrin g='<%#
System.Configur ation.Configura tionSettings.Ap pSettings("MM_C ONNECTION_STRIN G
_connusers") %>'
DatabaseType='< %#
System.Configur ation.Configura tionSettings.Ap pSettings("MM_C ONNECTION_DATAB A
SETYPE_connuser s") %>'
CommandText='<% # "SELECT * FROM tbl_users WHERE user_name = ? AND
user_password = ?" %>'
Debug="true"
<Parameters >

<Parameter Name="@user_nam e" Value='<%# IIf((Request.Fo rm("user_name" )
<> Nothing), Request.Form("u ser_name"), "") %>' Type="WChar" />
<Parameter Name="@user_pas sword" Value='<%#
IIf((Request.Fo rm("user_passwo rd") <> Nothing),
Request.Form("u ser_password"), "") %>' Type="WChar" />
</Parameters></MM:DataSet>
<MM:PageBind runat="server" PostBackBind="t rue" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>LOGIN</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="backoffic e.css" rel="stylesheet " type="text/css">
</head>
<body>
<p>&nbsp;</p>
<p>&nbsp;</p>
<form method="POST" enctype="applic ation/x-www-form-urlencoded" id="form1"
runat="server">
<table width="379" height="379" border="0" align="center"
background="ima ges/selfmanager.jpg " class="tblresul ts">
<tbody>
<tr>
<td height="190" valign="bottom" ><div align="center"> <strong>
</strong></div></td>
</tr>
<tr>
<td><div align="center" class="style1">
</div></td>
</tr>
<tr>
<td><div align="center"> </div></td>
</tr>
<tr>
<td bgcolor="#FFFFF F"><div align="center" class="style3"> <span
class="style1"> <span class="style2">
<asp:Label ID="txt_failed " runat="server" />
</span></span>Gebruikers naam:</div></td>
</tr>
<tr>
<td>
<div align="center">
<asp:TextBox id="user_name" runat="server"> </asp:TextBox>
<asp:RequiredFi eldValidator ID="RequiredFie ldValidator1"
EnableClientScr ipt="true" Display="Dynami c" ErrorMessage="V erplicht"
ControlToValida te="user_name" runat="server"> </asp:RequiredFie ldValidator>
</div></td>
</tr>
<tr>
<td bgcolor="#FFFFF F"><div align="center"
class="style3"> Wachtwoord:</div></td>
</tr>
<tr>
<td>
<div align="center">
<asp:TextBox ID="user_passwo rd" runat="server"
TextMode="Passw ord"
/>
<asp:RequiredFi eldValidator ID="RequiredFie ldValidator2"
EnableClientScr ipt="true" Display="Dynami c" ErrorMessage="V erplicht"
ControlToValida te="user_passwo rd"
runat="server"> </asp:RequiredFie ldValidator>
</div></td>
</tr>
<tr>
<td><div align="center"> </div></td>
</tr>
<tr>
<td>
<div align="center">
<asp:Button ID="submit" OnClick="onlogi n" runat="server"
Text="LOG-IN"></asp:Button>
</div></td>
</tr>
<tr>
<td>
<div align="center">
<script runat="server">
sub onlogin (sender As Object, e As System.EventArg s)
response.write( "ok1")
if dsusers.recordc ount > 0 then
Formsauthentica tion.redirectfr omloginpage("ba ckoffice", true)
response.redire ct("/backoffice/accesslevel1/index.aspx")
else if ((request.form( "user_password" )))<> nothing OR
((request.form( "user_name" ))) <> nothing
txt_failed.text ="Login MISLUKT. Probeer opnieuw."
end if
end sub
</script>

</div></td>
</tr>
</tbody>
</table>

</form>
</body>
</html>
############### ######## CODE END ############### ########

Nov 19 '05 #2
Great !

THX a lot.
Sent it to my hoster. Hope it helps.
Ciao
"Tampa.NET Koder" <an*******@micr osoft.com> wrote in message
news:uZ******** ******@TK2MSFTN GP10.phx.gbl...
Copy the aspnet_client folder (I think thats the name) from the root
directory of your web server ( c:\Inetpub\wwwr oot\aspnet_clie nt) to the root directory of your webfolder on the server. That should get this working.
This is a bug in the .net 1.1. See article below. Your hosting admins
would need to follow whats is the document to prevent this.
http://support.microsoft.com/?kbid=889877

"nicholas" <mu********@hot mail.com> wrote in message
news:ec******** ******@tk2msftn gp13.phx.gbl...
Weird thing:

Got an aspx page with a button and an associated code in VB.net.
On my testing server the page works fine.
On the old hosters server the page worked fine too.
But now, at the new hoster it does not.

When I click on the submit button: nothing happens.
The only thing that works is form validation.

I pasted the code below.
It's a login page, but I added this in the code to be sure that the
problem
is on this page:
response.write( "ok1")
So even this ok1 does not appear.
In fact, when I click on the button, the page is not posted.

Could it be a setting at the hosters server. The hoster says asp.net
scripting is active for the whole site.
PS: other aspx pages on the same website with buttons etc do work at that hoster.
I really don't get it.

THX for help !

############### ######## CODE START ############### ########

<%@ Page Language="VB" ContentType="te xt/html"
ResponseEncodin g="iso-8859-1"
%>
<%@ Register TagPrefix="MM" Namespace="Drea mweaverCtrls"
Assembly="Dream weaverCtrls,ver sion=1.0.0.0,pu blicKeyToken=83 6f606ede05d46a, c ulture=neutral" %>
<MM:DataSet
id="dsusers"
runat="Server"
IsStoredProcedu re="false"
ConnectionStrin g='<%#
System.Configur ation.Configura tionSettings.Ap pSettings("MM_C ONNECTION_STRIN G _connusers") %>'
DatabaseType='< %#
System.Configur ation.Configura tionSettings.Ap pSettings("MM_C ONNECTION_DATAB A SETYPE_connuser s") %>'
CommandText='<% # "SELECT * FROM tbl_users WHERE user_name = ? AND
user_password = ?" %>'
Debug="true"
<Parameters >

<Parameter Name="@user_nam e" Value='<%# IIf((Request.Fo rm("user_name" ) <> Nothing), Request.Form("u ser_name"), "") %>' Type="WChar" />
<Parameter Name="@user_pas sword" Value='<%#
IIf((Request.Fo rm("user_passwo rd") <> Nothing),
Request.Form("u ser_password"), "") %>' Type="WChar" />
</Parameters></MM:DataSet>
<MM:PageBind runat="server" PostBackBind="t rue" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>LOGIN</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="backoffic e.css" rel="stylesheet " type="text/css">
</head>
<body>
<p>&nbsp;</p>
<p>&nbsp;</p>
<form method="POST" enctype="applic ation/x-www-form-urlencoded" id="form1" runat="server">
<table width="379" height="379" border="0" align="center"
background="ima ges/selfmanager.jpg " class="tblresul ts">
<tbody>
<tr>
<td height="190" valign="bottom" ><div align="center"> <strong>
</strong></div></td>
</tr>
<tr>
<td><div align="center" class="style1">
</div></td>
</tr>
<tr>
<td><div align="center"> </div></td>
</tr>
<tr>
<td bgcolor="#FFFFF F"><div align="center" class="style3"> <span
class="style1"> <span class="style2">
<asp:Label ID="txt_failed " runat="server" />
</span></span>Gebruikers naam:</div></td>
</tr>
<tr>
<td>
<div align="center">
<asp:TextBox id="user_name" runat="server"> </asp:TextBox>
<asp:RequiredFi eldValidator ID="RequiredFie ldValidator1"
EnableClientScr ipt="true" Display="Dynami c" ErrorMessage="V erplicht"
ControlToValida te="user_name" runat="server"> </asp:RequiredFie ldValidator> </div></td>
</tr>
<tr>
<td bgcolor="#FFFFF F"><div align="center"
class="style3"> Wachtwoord:</div></td>
</tr>
<tr>
<td>
<div align="center">
<asp:TextBox ID="user_passwo rd" runat="server"
TextMode="Passw ord"
/>
<asp:RequiredFi eldValidator ID="RequiredFie ldValidator2"
EnableClientScr ipt="true" Display="Dynami c" ErrorMessage="V erplicht"
ControlToValida te="user_passwo rd"
runat="server"> </asp:RequiredFie ldValidator>
</div></td>
</tr>
<tr>
<td><div align="center"> </div></td>
</tr>
<tr>
<td>
<div align="center">
<asp:Button ID="submit" OnClick="onlogi n" runat="server"
Text="LOG-IN"></asp:Button>
</div></td>
</tr>
<tr>
<td>
<div align="center">
<script runat="server">
sub onlogin (sender As Object, e As System.EventArg s)
response.write( "ok1")
if dsusers.recordc ount > 0 then
Formsauthentica tion.redirectfr omloginpage("ba ckoffice", true)
response.redire ct("/backoffice/accesslevel1/index.aspx")
else if ((request.form( "user_password" )))<> nothing OR
((request.form( "user_name" ))) <> nothing
txt_failed.text ="Login MISLUKT. Probeer opnieuw."
end if
end sub
</script>

</div></td>
</tr>
</tbody>
</table>

</form>
</body>
</html>
############### ######## CODE END ############### ########


Nov 19 '05 #3
Just to be clear. You should copy that folder from your machine (testing)
to your hosting enviornment. This is the work-a-round. Then leave it up to
your hosting provider make the correct fix as posted by MSFT.
"nicholas" <mu********@hot mail.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
Great !

THX a lot.
Sent it to my hoster. Hope it helps.
Ciao
"Tampa.NET Koder" <an*******@micr osoft.com> wrote in message
news:uZ******** ******@TK2MSFTN GP10.phx.gbl...
Copy the aspnet_client folder (I think thats the name) from the root
directory of your web server ( c:\Inetpub\wwwr oot\aspnet_clie nt) to the

root
directory of your webfolder on the server. That should get this working.
This is a bug in the .net 1.1. See article below. Your hosting admins
would need to follow whats is the document to prevent this.
http://support.microsoft.com/?kbid=889877

"nicholas" <mu********@hot mail.com> wrote in message
news:ec******** ******@tk2msftn gp13.phx.gbl...
> Weird thing:
>
> Got an aspx page with a button and an associated code in VB.net.
> On my testing server the page works fine.
> On the old hosters server the page worked fine too.
> But now, at the new hoster it does not.
>
> When I click on the submit button: nothing happens.
> The only thing that works is form validation.
>
> I pasted the code below.
> It's a login page, but I added this in the code to be sure that the
> problem
> is on this page:
> response.write( "ok1")
> So even this ok1 does not appear.
> In fact, when I click on the button, the page is not posted.
>
> Could it be a setting at the hosters server. The hoster says asp.net
> scripting is active for the whole site.
> PS: other aspx pages on the same website with buttons etc do work at that > hoster.
> I really don't get it.
>
> THX for help !
>
> ############### ######## CODE START ############### ########
>
> <%@ Page Language="VB" ContentType="te xt/html"
> ResponseEncodin g="iso-8859-1"
> %>
> <%@ Register TagPrefix="MM" Namespace="Drea mweaverCtrls"
> Assembly="Dream weaverCtrls,ver sion=1.0.0.0,pu blicKeyToken=83 6f606ede05d46a, c > ulture=neutral" %>
> <MM:DataSet
> id="dsusers"
> runat="Server"
> IsStoredProcedu re="false"
> ConnectionStrin g='<%#
> System.Configur ation.Configura tionSettings.Ap pSettings("MM_C ONNECTION_STRIN G > _connusers") %>'
> DatabaseType='< %#
> System.Configur ation.Configura tionSettings.Ap pSettings("MM_C ONNECTION_DATAB A > SETYPE_connuser s") %>'
> CommandText='<% # "SELECT * FROM tbl_users WHERE user_name = ? AND
> user_password = ?" %>'
> Debug="true"
>><Parameters >
> <Parameter Name="@user_nam e" Value='<%# IIf((Request.Fo rm("user_name" ) > <> Nothing), Request.Form("u ser_name"), "") %>' Type="WChar" />
> <Parameter Name="@user_pas sword" Value='<%#
> IIf((Request.Fo rm("user_passwo rd") <> Nothing),
> Request.Form("u ser_password"), "") %>' Type="WChar" />
> </Parameters></MM:DataSet>
> <MM:PageBind runat="server" PostBackBind="t rue" />
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <title>LOGIN</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
> <link href="backoffic e.css" rel="stylesheet " type="text/css">
> </head>
> <body>
> <p>&nbsp;</p>
> <p>&nbsp;</p>
> <form method="POST" enctype="applic ation/x-www-form-urlencoded" id="form1" > runat="server">
> <table width="379" height="379" border="0" align="center"
> background="ima ges/selfmanager.jpg " class="tblresul ts">
> <tbody>
> <tr>
> <td height="190" valign="bottom" ><div align="center"> <strong>
> </strong></div></td>
> </tr>
> <tr>
> <td><div align="center" class="style1">
> </div></td>
> </tr>
> <tr>
> <td><div align="center"> </div></td>
> </tr>
> <tr>
> <td bgcolor="#FFFFF F"><div align="center" class="style3"> <span
> class="style1"> <span class="style2">
> <asp:Label ID="txt_failed " runat="server" />
> </span></span>Gebruikers naam:</div></td>
> </tr>
> <tr>
> <td>
> <div align="center">
> <asp:TextBox id="user_name" runat="server"> </asp:TextBox>
> <asp:RequiredFi eldValidator ID="RequiredFie ldValidator1"
> EnableClientScr ipt="true" Display="Dynami c" ErrorMessage="V erplicht"
> ControlToValida te="user_name" runat="server"> </asp:RequiredFie ldValidator> > </div></td>
> </tr>
> <tr>
> <td bgcolor="#FFFFF F"><div align="center"
> class="style3"> Wachtwoord:</div></td>
> </tr>
> <tr>
> <td>
> <div align="center">
> <asp:TextBox ID="user_passwo rd" runat="server"
> TextMode="Passw ord"
> />
> <asp:RequiredFi eldValidator ID="RequiredFie ldValidator2"
> EnableClientScr ipt="true" Display="Dynami c" ErrorMessage="V erplicht"
> ControlToValida te="user_passwo rd"
> runat="server"> </asp:RequiredFie ldValidator>
> </div></td>
> </tr>
> <tr>
> <td><div align="center"> </div></td>
> </tr>
> <tr>
> <td>
> <div align="center">
> <asp:Button ID="submit" OnClick="onlogi n" runat="server"
> Text="LOG-IN"></asp:Button>
> </div></td>
> </tr>
> <tr>
> <td>
> <div align="center">
> <script runat="server">
> sub onlogin (sender As Object, e As System.EventArg s)
> response.write( "ok1")
> if dsusers.recordc ount > 0 then
> Formsauthentica tion.redirectfr omloginpage("ba ckoffice", true)
> response.redire ct("/backoffice/accesslevel1/index.aspx")
> else if ((request.form( "user_password" )))<> nothing OR
> ((request.form( "user_name" ))) <> nothing
> txt_failed.text ="Login MISLUKT. Probeer opnieuw."
> end if
> end sub
> </script>
>
> </div></td>
> </tr>
> </tbody>
> </table>
>
> </form>
> </body>
> </html>
> ############### ######## CODE END ############### ########
>
>



Nov 19 '05 #4
Yep
They did the fix and it works now.
So didn't have to do the work-around.

THX a lot !

"Tampa.NET Koder" <an*******@micr osoft.com> wrote in message
news:OI******** ******@TK2MSFTN GP14.phx.gbl...
Just to be clear. You should copy that folder from your machine (testing)
to your hosting enviornment. This is the work-a-round. Then leave it up to your hosting provider make the correct fix as posted by MSFT.
"nicholas" <mu********@hot mail.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
Great !

THX a lot.
Sent it to my hoster. Hope it helps.
Ciao
"Tampa.NET Koder" <an*******@micr osoft.com> wrote in message
news:uZ******** ******@TK2MSFTN GP10.phx.gbl...
Copy the aspnet_client folder (I think thats the name) from the root
directory of your web server ( c:\Inetpub\wwwr oot\aspnet_clie nt) to the

root
directory of your webfolder on the server. That should get this working. This is a bug in the .net 1.1. See article below. Your hosting admins
would need to follow whats is the document to prevent this.
http://support.microsoft.com/?kbid=889877

"nicholas" <mu********@hot mail.com> wrote in message
news:ec******** ******@tk2msftn gp13.phx.gbl...
> Weird thing:
>
> Got an aspx page with a button and an associated code in VB.net.
> On my testing server the page works fine.
> On the old hosters server the page worked fine too.
> But now, at the new hoster it does not.
>
> When I click on the submit button: nothing happens.
> The only thing that works is form validation.
>
> I pasted the code below.
> It's a login page, but I added this in the code to be sure that the
> problem
> is on this page:
> response.write( "ok1")
> So even this ok1 does not appear.
> In fact, when I click on the button, the page is not posted.
>
> Could it be a setting at the hosters server. The hoster says asp.net
> scripting is active for the whole site.
> PS: other aspx pages on the same website with buttons etc do work at

that
> hoster.
> I really don't get it.
>
> THX for help !
>
> ############### ######## CODE START ############### ########
>
> <%@ Page Language="VB" ContentType="te xt/html"
> ResponseEncodin g="iso-8859-1"
> %>
> <%@ Register TagPrefix="MM" Namespace="Drea mweaverCtrls"
>

Assembly="Dream weaverCtrls,ver sion=1.0.0.0,pu blicKeyToken=83 6f606ede05d46a, c
> ulture=neutral" %>
> <MM:DataSet
> id="dsusers"
> runat="Server"
> IsStoredProcedu re="false"
> ConnectionStrin g='<%#
>

System.Configur ation.Configura tionSettings.Ap pSettings("MM_C ONNECTION_STRIN G
> _connusers") %>'
> DatabaseType='< %#
>

System.Configur ation.Configura tionSettings.Ap pSettings("MM_C ONNECTION_DATAB A
> SETYPE_connuser s") %>'
> CommandText='<% # "SELECT * FROM tbl_users WHERE user_name = ? AND
> user_password = ?" %>'
> Debug="true"
>><Parameters >
> <Parameter Name="@user_nam e" Value='<%#

IIf((Request.Fo rm("user_name" )
> <> Nothing), Request.Form("u ser_name"), "") %>' Type="WChar" />
> <Parameter Name="@user_pas sword" Value='<%#
> IIf((Request.Fo rm("user_passwo rd") <> Nothing),
> Request.Form("u ser_password"), "") %>' Type="WChar" />
> </Parameters></MM:DataSet>
> <MM:PageBind runat="server" PostBackBind="t rue" />
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <title>LOGIN</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
> <link href="backoffic e.css" rel="stylesheet " type="text/css">
> </head>
> <body>
> <p>&nbsp;</p>
> <p>&nbsp;</p>
> <form method="POST" enctype="applic ation/x-www-form-urlencoded"

id="form1"
> runat="server">
> <table width="379" height="379" border="0" align="center"
> background="ima ges/selfmanager.jpg " class="tblresul ts">
> <tbody>
> <tr>
> <td height="190" valign="bottom" ><div align="center"> <strong>
> </strong></div></td>
> </tr>
> <tr>
> <td><div align="center" class="style1">
> </div></td>
> </tr>
> <tr>
> <td><div align="center"> </div></td>
> </tr>
> <tr>
> <td bgcolor="#FFFFF F"><div align="center" class="style3"> <span
> class="style1"> <span class="style2">
> <asp:Label ID="txt_failed " runat="server" />
> </span></span>Gebruikers naam:</div></td>
> </tr>
> <tr>
> <td>
> <div align="center">
> <asp:TextBox id="user_name" runat="server"> </asp:TextBox>
> <asp:RequiredFi eldValidator ID="RequiredFie ldValidator1"
> EnableClientScr ipt="true" Display="Dynami c" ErrorMessage="V erplicht"
> ControlToValida te="user_name"

runat="server"> </asp:RequiredFie ldValidator>
> </div></td>
> </tr>
> <tr>
> <td bgcolor="#FFFFF F"><div align="center"
> class="style3"> Wachtwoord:</div></td>
> </tr>
> <tr>
> <td>
> <div align="center">
> <asp:TextBox ID="user_passwo rd" runat="server"
> TextMode="Passw ord"
> />
> <asp:RequiredFi eldValidator ID="RequiredFie ldValidator2"
> EnableClientScr ipt="true" Display="Dynami c" ErrorMessage="V erplicht"
> ControlToValida te="user_passwo rd"
> runat="server"> </asp:RequiredFie ldValidator>
> </div></td>
> </tr>
> <tr>
> <td><div align="center"> </div></td>
> </tr>
> <tr>
> <td>
> <div align="center">
> <asp:Button ID="submit" OnClick="onlogi n" runat="server"
> Text="LOG-IN"></asp:Button>
> </div></td>
> </tr>
> <tr>
> <td>
> <div align="center">
> <script runat="server">
> sub onlogin (sender As Object, e As System.EventArg s)
> response.write( "ok1")
> if dsusers.recordc ount > 0 then
> Formsauthentica tion.redirectfr omloginpage("ba ckoffice", true)
> response.redire ct("/backoffice/accesslevel1/index.aspx")
> else if ((request.form( "user_password" )))<> nothing OR
> ((request.form( "user_name" ))) <> nothing
> txt_failed.text ="Login MISLUKT. Probeer opnieuw."
> end if
> end sub
> </script>
>
> </div></td>
> </tr>
> </tbody>
> </table>
>
> </form>
> </body>
> </html>
> ############### ######## CODE END ############### ########
>
>



Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
5456
by: tshad | last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an asp.net problem or a javascript problem. I have a page that was originally created from a program I found on the net that works well as an html page. It brings up a modal popup window that I have been trying to work out for days now and this was the closest I have been able to come. I added a little asp.net code and an asp.net button and cannot get it to
11
13919
by: CW | last post by:
I have message entry screen that's causing me a bit of an issue. At the moment, there are 2 buttons, one is used to send message to another user (btnSend) and another is used to send messages to all users (btnSendAll). When user hits enter, I also simulate the effect of clicking button (btnSend). However, what I found btnSend doesn't fire (unless I click on the button). The postback function I call is as follows: function...
8
3881
by: tatemononai | last post by:
I had a beautiful script that was running, well, just beautifully. But then I decided to take a button that fired an event and place it inside a <asp:table. The event WILL NOT FIRE INSIDE THE TABLE!?! When I move the button outside the table, it works just fine. Inside the table, it doesn't. What gives?
1
1792
by: Klaus Jensen | last post by:
Hi! This has been annoying me all day, and I can't get it to work It is really driving me nuts! Basicly this simple webapp created to illustrate my problem, renders five buttons, and adds a handler to the click event. When a button is clicked, the background-color is set to blue. Try running the page, and clicking the "Do stuff and update controls
4
4793
by: John Smith | last post by:
I have a continuous form. there is a command button with the following code for the OnClick event: DoCmd.OpenForm "frmPlants", , , "PlantsID =" & Me!PlantsID I click the button and frmPlants opens up with the record that corresponds to the one on the cont. form. I put that same code for the OnClick of an image control (i.e. the user clicks a little icon to open the form instead of a button) and frmPlants
11
4215
by: bill | last post by:
I dynamically create buttons and associate them with an event using AddHandler. I want all the button events to fire at one time, when the page is posted, instead of when each button is clicked. How I stop the buttons from posting back when they are clicked? Thanks
8
2033
by: Richard Maher | last post by:
Hi, I am in a mouseup event for button A and I'd like to disable=false button B before starting some work. Is there anyway that an event for button B can then fire before my event processing for button A's mouseup has completed? I beleive event processing to be single-threaded for good reason but I need a "stop" button and it's no good if it doesn't do anything until the other processing has finished :-)
5
2717
by: swatidesai0407 | last post by:
hi im validating radio buttons i create dis radio button in php based on some how many records of my query. i wrote a javascript to validate this buttons. wat i do is dat wen no radio button are selected it should giv message dat select a radio button. else it should go to other page. My code works fine when there are more than 1 radio button but when only 1 radio button is der dat time it does not work
1
4431
by: Jeffrey Christiansen | last post by:
I wanted to add a toggle button to a VB2005 form to be used for a simple Windows Application (i.e. compiled to a "*.exe"), so I added the ActiveX Microsoft Forms Object toggle button, however I can't get this button does work properly. The documentation I found in the FM20.CHM files says the button state can be determined from its "Value" property, but the property list shown in VB2005 does not have a "Value" property. How is the button...
0
8924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8823
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8672
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6234
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4412
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2058
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.