473,666 Members | 2,098 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP:button Does NOT fire

Hi,

I'm at my wits end!!! I have the following code. The submit button works on
my home computer but when I copy the dll and the ASPX file to my host
provider, the button does NOT fire.

TIA
RuizCJ
<%@ Register TagPrefix="uc1" TagName="_Foote r" Src="_Footer.as cx" %>
<%@ Page Language="vb" AutoEventWireup ="false"
Codebehind="Sig nGuestBook.aspx .vb" Inherits="Ruiz. SignGuestBook"% >
<%@ Register TagPrefix="uc1" TagName="_heade r" Src="_header.as cx" %>
<%@ Register TagPrefix="uc1" TagName="_menu" Src="_menu.ascx " %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>SignGues tBook</title>
<meta content="Micros oft Visual Studio .NET 7.1" name=GENERATOR>
<meta content="Visual Basic .NET 7.1" name=CODE_LANGU AGE>
<meta content=JavaScr ipt name=vs_default ClientScript>
<meta content=http://schemas.microso ft.com/intellisense/ie5
name=vs_targetS chema>
</HEAD>
<body leftMargin=0 topMargin=0 MS_POSITIONING= "GridLayout ">
<form id=idSignGuestB ook method=post runat="server">
<TABLE id=Table1 style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP:
8px"
borderColor=#ff 3333 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TR>
<TD colSpan=4><uc1: _header id=_header1
runat="server"> </uc1:_header></TD></TR>
<TR>
<TD vAlign=top width=200 rowSpan=3><uc1: _menu id=_menu1
runat="server"> </uc1:_menu></TD>
<TD style="WIDTH: 29px; HEIGHT: 41px" vAlign=top width=29
</TD> <TD style="HEIGHT: 41px" width=200></TD></TR>
<TR>
<TD style="WIDTH: 29px" vAlign=top width=29></TD>
<TD vAlign=top width="80%">
<TABLE id=Table2 cellSpacing=3 cellPadding=3 width=450 align=center
bgColor=#f1d6b9 border=0>
<TR>
<TD align=center background=Imag es/GradientPeach.g if colSpan=4Sign Guest Book</TD></TR> <TR>
<TD style="WIDTH: 172px" align=right width=172Name:*</TD> <TD><asp:textbo x id=idname runat="server" ToolTip="Enter your name
here" Height="24px" Width="312px"></asp:textbox></TD>
<TD><asp:requir edfieldvalidato r id=RequiredFiel dValidator1
runat="server" Width="7px" ControlToValida te="idname"
ErrorMessage="* "></asp:requiredfie ldvalidator></TD>
<TD></TD></TR>
<TR>
<TD style="WIDTH: 172px" align=rightLocation:*</TD> <TD><asp:textbo x id=idlocation runat="server" ToolTip="City and
state will do" Width="312px"></asp:textbox></TD>
<TD><asp:requir edfieldvalidato r id=RequiredFiel dValidator2
runat="server" ControlToValida te="idlocation "
ErrorMessage="* "></asp:requiredfie ldvalidator></TD>
<TD></TD></TR>
<TR>
<TD style="WIDTH: 172px" align=right>Web site:</TD>
<TD><asp:textbo x id=idwebsite runat="server" ToolTip="must proceed
with HTTP://" Width="312px"></asp:textbox></TD>
<TD></TD>
<TD></TD></TR>
<TR>
<TD style="WIDTH: 172px" align=right>Ema il:</TD>
<TD><asp:textbo x id=idemail runat="server" ToolTip="valid e-mail
goes here" Width="312px"></asp:textbox></TD>
<TD></TD>
<TD></TD></TR>
<TR>
<TD style="WIDTH: 172px" align=rightComment:*</TD> <TD><asp:textbo x id=idcomment runat="server" ToolTip="type any
comment here" Height="136px" Width="312px"
TextMode="Multi Line"></asp:textbox></TD>
<TD><asp:requir edfieldvalidato r id=RequiredFiel dValidator3
runat="server" ControlToValida te="idcomment"
ErrorMessage="* "></asp:requiredfie ldvalidator></TD>
<TD></TD></TR>
<TR>
<TD style="WIDTH: 172px" align=right width=172 colSpan=1<asp:checkbo x id=idemailme runat="server" ToolTip="if you enter an e-mail and check this box, you'll be e-mailed automatically with new
updates" Height="13px"></asp:checkbox></TD>
<TD>E-mail me when there's new update</TD>
<TD></TD>
<TD></TD></TR>
<TR>
<TD style="WIDTH: 172px"></TD>
<TD><asp:butt on id=Button1 runat="server" Text="Submit"
EnableViewState =True CausesValidatio n=True</asp:Button>&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;

*<FONT size=2>=Require d</FONT></TD>
<TD></TD>
<TD></TD></TR>
<TR>
<TD style="WIDTH: 172px">
<asp:TextBox id=TextBox1 runat="server" Width="95px"
Visible="False" ></asp:TextBox></TD>
<TD><asp:labe l id=idThankYou runat="server" Width="280px"
Visible="False" >Thank you for signing our guestbook</asp:label></TD>
<TD></TD>
<TD></TD></TR></TABLE></TD>
<TD width=200></TD></TR>
<TR>
<TD style="WIDTH: 29px" width=29></TD>
<TD width="80%"><uc 1:_footer id=_Footer1
runat="server"> </uc1:_footer></TD>
<TD width=200></TD></TR></TABLE></FORM>

</body>
</HTML>
code behind.....

Imports System
Imports System.Data
Imports System.Data.Ole Db
Imports Microsoft.Visua lBasic

Public Class SignGuestBook
Inherits System.Web.UI.P age
Dim myConnection As OleDbConnection
#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub
InitializeCompo nent()
Me.ID = "idSignGuestBoo k"

End Sub
Protected WithEvents idname As System.Web.UI.W ebControls.Text Box
Protected WithEvents idlocation As System.Web.UI.W ebControls.Text Box
Protected WithEvents idwebsite As System.Web.UI.W ebControls.Text Box
Protected WithEvents idemail As System.Web.UI.W ebControls.Text Box
Protected WithEvents idcomment As System.Web.UI.W ebControls.Text Box
Protected WithEvents idThankYou As System.Web.UI.W ebControls.Labe l
Protected WithEvents idemailme As System.Web.UI.W ebControls.Chec kBox
Protected WithEvents RequiredFieldVa lidator1 As
System.Web.UI.W ebControls.Requ iredFieldValida tor
Protected WithEvents RequiredFieldVa lidator2 As
System.Web.UI.W ebControls.Requ iredFieldValida tor
Protected WithEvents RequiredFieldVa lidator3 As
System.Web.UI.W ebControls.Requ iredFieldValida tor
Protected WithEvents Button1 As System.Web.UI.W ebControls.Butt on
Protected WithEvents TextBox1 As System.Web.UI.W ebControls.Text Box

'NOTE: The following placeholder declaration is required by the Web Form
Designer.
'Do not delete or move it.
Private designerPlaceho lderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeCompo nent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
myConnection = New
OleDbConnection (ConfigurationS ettings.AppSett ings("Connectio nString"))
End Sub

Sub AddNewGuest(ByV al sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
' Dim MyCommand As OleDbCommand
Dim emailme

Dim InsertCmd As String = "insert into tblGuestBook (name, email,
http, comment, location) values (@strName, @stremail, @strhttp, @strcomment,
@strlocation)"

Dim MyCommand As OleDbCommand = New OleDbCommand(In sertCmd,
myConnection)
MyCommand.Param eters.Add(New OleDbParameter( "@strName",
OleDbType.Char) )
MyCommand.Param eters("@strName ").Value = idname.Text

MyCommand.Param eters.Add(New OleDbParameter( "@stremail" ,
OleDbType.Char) )
MyCommand.Param eters("@stremai l").Value = idemail.Text

MyCommand.Param eters.Add(New OleDbParameter( "@strhttp",
OleDbType.Char) )
MyCommand.Param eters("@strhttp ").Value = idwebsite.Text

MyCommand.Param eters.Add(New OleDbParameter( "@strcommen t",
OleDbType.Char) )
MyCommand.Param eters("@strcomm ent").Value = idcomment.Text

MyCommand.Param eters.Add(New OleDbParameter( "@strlocati on",
OleDbType.Char) )
MyCommand.Param eters("@strloca tion").Value = idlocation.Text

MyCommand.Param eters.Add(New OleDbParameter( "@tf",
OleDbType.Boole an))
MyCommand.Param eters("@tf").Va lue = idemailme.Check ed

'MyCommand.Para meters.Add(New OleDbParameter( "@timesubmi t",
OleDbType.DBTim e))
'MyCommand.Para meters("@timesu bmit").Value = DateTime.Today

MyCommand.Conne ction.Open()

MyCommand.Execu teNonQuery()

MyCommand.Conne ction.Close()
myConnection.Cl ose()
idname.Text = " "
idemail.Text = " "
idwebsite.Text = " "
idcomment.Text = " "
idlocation.Text = " "
idThankYou.Visi ble = True

End Sub
End Class
Nov 18 '05 #1
1 3628
RUIZCJ wrote:
Hi,

I'm at my wits end!!! I have the following code. The submit button works
on my home computer but when I copy the dll and the ASPX file to my host
provider, the button does NOT fire.

TIA
RuizCJ


I noticed you're using Validation controls in your page. Service Pack 1 for
..NET framework v1.1 might be causing the problem you're seeing.
Specifically, you might be using a pre-SP1 version of the WebUIValidation .js
file. Microsoft updated this file in SP1. Have a look at the following
links to see if they help:

..NET Framework SP1 and NO Postack
http://www.asp.net/Forums/ShowPost.a...&PostID=683469

Service Pack 1 for .NET v1.1 Broke My ASP.NET App
http://weblogs.asp.net/pwilson/archi...16/230591.aspx

WebUIValidation .js / Framework Version Problem Solution
http://weblogs.asp.net/ssharrock/arc...18/244150.aspx

Ben
Nov 18 '05 #2

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

Similar topics

0
1574
by: Maziar Aflatoun | last post by:
Hi everyone, I have the following shopping cart (basket view). However, Delete button in my datagrid doesn't fire any events. Does anyone know why? (It's a user web control) <%@ Control Language="c#" AutoEventWireup="false" Codebehind="ShoppingCart.ascx.cs" Inherits="TPShoppingCart.ShoppingCart1" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%> <asp:datagrid id="DGShoppingCart" AutoGenerateColumns="False" Width="650"
2
1673
by: pkp303 | last post by:
I have a page with a submit button (<asp.button/>). When run this page in production the button fires and submits the form, however, when I run the page on my local machine, it won't submit! Any ideas?
4
2281
by: z. f. | last post by:
Hi, I'm having an aspx page with a server form. i have a grid with a delete button and below the grid, another area with inputs for inserting new values and an "add" button for submiting the lower area of the form. on the lower area i have validators for validating input.
3
2175
by: Rea Peleg | last post by:
Hi all This is so Bizarre - asp button click event is working perfectly on one page. I duplicated this page in order to use it again with minor modifications but there the button wont work.. It must be something silly, that i have changed without noticing but i just can't find it.... Buttons code is identical in both pages and i have another button on the problematic page which fires like M-16.
2
1538
by: Weston Weems | last post by:
Hello... I've got a solution with 7 projects... the problem I am having specifically is that I've got a simple asp:button on a simple usercontrol. I am making sure its not stupid vs.net forgetting event bidnings etc, but its just not even firing off a postback. on page load I register javascript, which gives no errors,
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?
2
18421
by: Opa | last post by:
Hi, I have a asp:button which allows a user to delete a record, and I wish to prompt them with a client side confirmation. The javascript confirm messagebox does show and the cancel button is fine, however when I click OK, I expect the Server Side Postback OnClick event to fire, but it does not. Any Ideas? Here is the code:
3
1027
by: hal | last post by:
Is it possible when an asp:button is clicked I can have the button use javascript client side code and fire the click event for the button for server side code? Code below is an example of what i'm trying to do: <script type="text/javascript"> function SetImage() { alert("Testing");
1
4893
by: mazdotnet | last post by:
Hi all, I'm really stuck trying to figure the following out. I have been working on a shopping portal where you can select products from a list inside a repeater on the bottom of the page and on each row, once clicked you can enter a quantity and add it to your cart automatically on top (using UpdatePanel). Everything seems to be working fine when I created a dummy DataTable and did a bind but now that I'm actually reading the contents...
0
8449
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8876
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
8642
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
6198
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
4198
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
4371
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2774
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1777
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.