Connecting Tech Pros Worldwide Forums | Help | Site Map

asp.net button does not work

nicholas
Guest
 
Posts: n/a
#1: Nov 19 '05
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,publicK eyToken=836f606ede05d46a,c
ulture=neutral" %>
<MM:DataSet
id="dsusers"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%#
System.Configuration.ConfigurationSettings.AppSett ings("MM_CONNECTION_STRING
_connusers") %>'
DatabaseType='<%#
System.Configuration.ConfigurationSettings.AppSett ings("MM_CONNECTION_DATABA
SETYPE_connusers") %>'
CommandText='<%# "SELECT * FROM tbl_users WHERE user_name = ? AND
user_password = ?" %>'
Debug="true"[color=blue]
><Parameters>[/color]
<Parameter Name="@user_name" Value='<%# IIf((Request.Form("user_name")
<> 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></MM:DataSet>
<MM:PageBind 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>&nbsp;</p>
<p>&nbsp;</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("backoff ice", 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 #######################



Tampa.NET Koder
Guest
 
Posts: n/a
#2: Nov 19 '05

re: asp.net button does not work


Copy the aspnet_client folder (I think thats the name) from the root
directory of your web server ( c:\Inetpub\wwwroot\aspnet_client) 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" <murmurait1@hotmail.com> wrote in message
news:ecoPuB7KFHA.4028@tk2msftngp13.phx.gbl...[color=blue]
> 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,publicK eyToken=836f606ede05d46a,c
> ulture=neutral" %>
> <MM:DataSet
> id="dsusers"
> runat="Server"
> IsStoredProcedure="false"
> ConnectionString='<%#
> System.Configuration.ConfigurationSettings.AppSett ings("MM_CONNECTION_STRING
> _connusers") %>'
> DatabaseType='<%#
> System.Configuration.ConfigurationSettings.AppSett ings("MM_CONNECTION_DATABA
> SETYPE_connusers") %>'
> CommandText='<%# "SELECT * FROM tbl_users WHERE user_name = ? AND
> user_password = ?" %>'
> Debug="true"[color=green]
>><Parameters>[/color]
> <Parameter Name="@user_name" Value='<%# IIf((Request.Form("user_name")
> <> 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></MM:DataSet>
> <MM:PageBind 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>&nbsp;</p>
> <p>&nbsp;</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("backoff ice", 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 #######################
>
>[/color]


nicholas
Guest
 
Posts: n/a
#3: Nov 19 '05

re: asp.net button does not work


Great !

THX a lot.
Sent it to my hoster. Hope it helps.
Ciao


"Tampa.NET Koder" <anonymous@microsoft.com> wrote in message
news:uZnq$O7KFHA.2604@TK2MSFTNGP10.phx.gbl...[color=blue]
> Copy the aspnet_client folder (I think thats the name) from the root
> directory of your web server ( c:\Inetpub\wwwroot\aspnet_client) to the[/color]
root[color=blue]
> 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" <murmurait1@hotmail.com> wrote in message
> news:ecoPuB7KFHA.4028@tk2msftngp13.phx.gbl...[color=green]
> > 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[/color][/color]
that[color=blue][color=green]
> > 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"
> >[/color][/color]
Assembly="DreamweaverCtrls,version=1.0.0.0,publicK eyToken=836f606ede05d46a,c[color=blue][color=green]
> > ulture=neutral" %>
> > <MM:DataSet
> > id="dsusers"
> > runat="Server"
> > IsStoredProcedure="false"
> > ConnectionString='<%#
> >[/color][/color]
System.Configuration.ConfigurationSettings.AppSett ings("MM_CONNECTION_STRING[color=blue][color=green]
> > _connusers") %>'
> > DatabaseType='<%#
> >[/color][/color]
System.Configuration.ConfigurationSettings.AppSett ings("MM_CONNECTION_DATABA[color=blue][color=green]
> > SETYPE_connusers") %>'
> > CommandText='<%# "SELECT * FROM tbl_users WHERE user_name = ? AND
> > user_password = ?" %>'
> > Debug="true"[color=darkred]
> >><Parameters>[/color]
> > <Parameter Name="@user_name" Value='<%#[/color][/color]
IIf((Request.Form("user_name")[color=blue][color=green]
> > <> 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></MM:DataSet>
> > <MM:PageBind 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>&nbsp;</p>
> > <p>&nbsp;</p>
> > <form method="POST" enctype="application/x-www-form-urlencoded"[/color][/color]
id="form1"[color=blue][color=green]
> > 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"[/color][/color]
runat="server"></asp:RequiredFieldValidator>[color=blue][color=green]
> > </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("backoff ice", 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 #######################
> >
> >[/color]
>
>[/color]


Tampa.NET Koder
Guest
 
Posts: n/a
#4: Nov 19 '05

re: asp.net button does not work


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" <murmurait1@hotmail.com> wrote in message
news:%23wO9tZ7KFHA.1176@TK2MSFTNGP15.phx.gbl...[color=blue]
> Great !
>
> THX a lot.
> Sent it to my hoster. Hope it helps.
> Ciao
>
>
> "Tampa.NET Koder" <anonymous@microsoft.com> wrote in message
> news:uZnq$O7KFHA.2604@TK2MSFTNGP10.phx.gbl...[color=green]
>> Copy the aspnet_client folder (I think thats the name) from the root
>> directory of your web server ( c:\Inetpub\wwwroot\aspnet_client) to the[/color]
> root[color=green]
>> 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" <murmurait1@hotmail.com> wrote in message
>> news:ecoPuB7KFHA.4028@tk2msftngp13.phx.gbl...[color=darkred]
>> > 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[/color][/color]
> that[color=green][color=darkred]
>> > 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"
>> >[/color][/color]
> Assembly="DreamweaverCtrls,version=1.0.0.0,publicK eyToken=836f606ede05d46a,c[color=green][color=darkred]
>> > ulture=neutral" %>
>> > <MM:DataSet
>> > id="dsusers"
>> > runat="Server"
>> > IsStoredProcedure="false"
>> > ConnectionString='<%#
>> >[/color][/color]
> System.Configuration.ConfigurationSettings.AppSett ings("MM_CONNECTION_STRING[color=green][color=darkred]
>> > _connusers") %>'
>> > DatabaseType='<%#
>> >[/color][/color]
> System.Configuration.ConfigurationSettings.AppSett ings("MM_CONNECTION_DATABA[color=green][color=darkred]
>> > SETYPE_connusers") %>'
>> > CommandText='<%# "SELECT * FROM tbl_users WHERE user_name = ? AND
>> > user_password = ?" %>'
>> > Debug="true"
>> >><Parameters>
>> > <Parameter Name="@user_name" Value='<%#[/color][/color]
> IIf((Request.Form("user_name")[color=green][color=darkred]
>> > <> 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></MM:DataSet>
>> > <MM:PageBind 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>&nbsp;</p>
>> > <p>&nbsp;</p>
>> > <form method="POST" enctype="application/x-www-form-urlencoded"[/color][/color]
> id="form1"[color=green][color=darkred]
>> > 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"[/color][/color]
> runat="server"></asp:RequiredFieldValidator>[color=green][color=darkred]
>> > </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("backoff ice", 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 #######################
>> >
>> >[/color]
>>
>>[/color]
>
>[/color]


nicholas
Guest
 
Posts: n/a
#5: Nov 19 '05

re: asp.net button does not work


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

THX a lot !

"Tampa.NET Koder" <anonymous@microsoft.com> wrote in message
news:OII7ki7KFHA.2852@TK2MSFTNGP14.phx.gbl...[color=blue]
> 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[/color]
to[color=blue]
> your hosting provider make the correct fix as posted by MSFT.
>
>
> "nicholas" <murmurait1@hotmail.com> wrote in message
> news:%23wO9tZ7KFHA.1176@TK2MSFTNGP15.phx.gbl...[color=green]
> > Great !
> >
> > THX a lot.
> > Sent it to my hoster. Hope it helps.
> > Ciao
> >
> >
> > "Tampa.NET Koder" <anonymous@microsoft.com> wrote in message
> > news:uZnq$O7KFHA.2604@TK2MSFTNGP10.phx.gbl...[color=darkred]
> >> Copy the aspnet_client folder (I think thats the name) from the root
> >> directory of your web server ( c:\Inetpub\wwwroot\aspnet_client) to the[/color]
> > root[color=darkred]
> >> directory of your webfolder on the server. That should get this[/color][/color][/color]
working.[color=blue][color=green][color=darkred]
> >> 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" <murmurait1@hotmail.com> wrote in message
> >> news:ecoPuB7KFHA.4028@tk2msftngp13.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[/color]
> > that[color=darkred]
> >> > 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"
> >> >[/color]
> >[/color][/color]
Assembly="DreamweaverCtrls,version=1.0.0.0,publicK eyToken=836f606ede05d46a,c[color=blue][color=green][color=darkred]
> >> > ulture=neutral" %>
> >> > <MM:DataSet
> >> > id="dsusers"
> >> > runat="Server"
> >> > IsStoredProcedure="false"
> >> > ConnectionString='<%#
> >> >[/color]
> >[/color][/color]
System.Configuration.ConfigurationSettings.AppSett ings("MM_CONNECTION_STRING[color=blue][color=green][color=darkred]
> >> > _connusers") %>'
> >> > DatabaseType='<%#
> >> >[/color]
> >[/color][/color]
System.Configuration.ConfigurationSettings.AppSett ings("MM_CONNECTION_DATABA[color=blue][color=green][color=darkred]
> >> > SETYPE_connusers") %>'
> >> > CommandText='<%# "SELECT * FROM tbl_users WHERE user_name = ? AND
> >> > user_password = ?" %>'
> >> > Debug="true"
> >> >><Parameters>
> >> > <Parameter Name="@user_name" Value='<%#[/color]
> > IIf((Request.Form("user_name")[color=darkred]
> >> > <> 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></MM:DataSet>
> >> > <MM:PageBind 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>&nbsp;</p>
> >> > <p>&nbsp;</p>
> >> > <form method="POST" enctype="application/x-www-form-urlencoded"[/color]
> > id="form1"[color=darkred]
> >> > 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"[/color]
> > runat="server"></asp:RequiredFieldValidator>[color=darkred]
> >> > </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("backoff ice", 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 #######################
> >> >
> >> >
> >>
> >>[/color]
> >
> >[/color]
>
>[/color]


Closed Thread