N
nicholas
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="text/html" ResponseEncoding="iso-8859-1"
%>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls"
Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,c
ulture=neutral" %>
<MMataSet
id="dsusers"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%#
System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING
_connusers") %>'
DatabaseType='<%#
System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABA
SETYPE_connusers") %>'
CommandText='<%# "SELECT * FROM tbl_users WHERE user_name = ? AND
user_password = ?" %>'
Debug="true"
<> Nothing), Request.Form("user_name"), "") %>' Type="WChar" />
<Parameter Name="@user_password" Value='<%#
IIf((Request.Form("user_password") <> Nothing),
Request.Form("user_password"), "") %>' Type="WChar" />
</Parameters></MMataSet>
<MMageBind runat="server" PostBackBind="true" />
<!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="backoffice.css" rel="stylesheet" type="text/css">
</head>
<body>
<p> </p>
<p> </p>
<form method="POST" enctype="application/x-www-form-urlencoded" id="form1"
runat="server">
<table width="379" height="379" border="0" align="center"
background="images/selfmanager.jpg" class="tblresults">
<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="#FFFFFF"><div align="center" class="style3"><span
class="style1"><span class="style2">
<asp:Label ID="txt_failed" runat="server" />
</span></span>Gebruikersnaam:</div></td>
</tr>
<tr>
<td>
<div align="center">
<asp:TextBox id="user_name" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
EnableClientScript="true" Display="Dynamic" ErrorMessage="Verplicht"
ControlToValidate="user_name" runat="server"></asp:RequiredFieldValidator>
</div></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><div align="center"
class="style3">Wachtwoord:</div></td>
</tr>
<tr>
<td>
<div align="center">
<asp:TextBox ID="user_password" runat="server" TextMode="Password"
/>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2"
EnableClientScript="true" Display="Dynamic" ErrorMessage="Verplicht"
ControlToValidate="user_password"
runat="server"></asp:RequiredFieldValidator>
</div></td>
</tr>
<tr>
<td><div align="center"></div></td>
</tr>
<tr>
<td>
<div align="center">
<asp:Button ID="submit" OnClick="onlogin" 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.EventArgs)
response.write("ok1")
if dsusers.recordcount > 0 then
Formsauthentication.redirectfromloginpage("backoffice", true)
response.redirect("/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 #######################
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="text/html" ResponseEncoding="iso-8859-1"
%>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls"
Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,c
ulture=neutral" %>
<MMataSet
id="dsusers"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%#
System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING
_connusers") %>'
DatabaseType='<%#
System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABA
SETYPE_connusers") %>'
CommandText='<%# "SELECT * FROM tbl_users WHERE user_name = ? AND
user_password = ?" %>'
Debug="true"
<Parameter Name="@user_name" Value='<%# IIf((Request.Form("user_name")<Parameters>
<> Nothing), Request.Form("user_name"), "") %>' Type="WChar" />
<Parameter Name="@user_password" Value='<%#
IIf((Request.Form("user_password") <> Nothing),
Request.Form("user_password"), "") %>' Type="WChar" />
</Parameters></MMataSet>
<MMageBind runat="server" PostBackBind="true" />
<!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="backoffice.css" rel="stylesheet" type="text/css">
</head>
<body>
<p> </p>
<p> </p>
<form method="POST" enctype="application/x-www-form-urlencoded" id="form1"
runat="server">
<table width="379" height="379" border="0" align="center"
background="images/selfmanager.jpg" class="tblresults">
<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="#FFFFFF"><div align="center" class="style3"><span
class="style1"><span class="style2">
<asp:Label ID="txt_failed" runat="server" />
</span></span>Gebruikersnaam:</div></td>
</tr>
<tr>
<td>
<div align="center">
<asp:TextBox id="user_name" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
EnableClientScript="true" Display="Dynamic" ErrorMessage="Verplicht"
ControlToValidate="user_name" runat="server"></asp:RequiredFieldValidator>
</div></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><div align="center"
class="style3">Wachtwoord:</div></td>
</tr>
<tr>
<td>
<div align="center">
<asp:TextBox ID="user_password" runat="server" TextMode="Password"
/>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2"
EnableClientScript="true" Display="Dynamic" ErrorMessage="Verplicht"
ControlToValidate="user_password"
runat="server"></asp:RequiredFieldValidator>
</div></td>
</tr>
<tr>
<td><div align="center"></div></td>
</tr>
<tr>
<td>
<div align="center">
<asp:Button ID="submit" OnClick="onlogin" 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.EventArgs)
response.write("ok1")
if dsusers.recordcount > 0 then
Formsauthentication.redirectfromloginpage("backoffice", true)
response.redirect("/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 #######################