R
RUIZCJ
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="_Footer" Src="_Footer.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="SignGuestBook.aspx.vb" Inherits="Ruiz.SignGuestBook"%>
<%@ Register TagPrefix="uc1" TagName="_header" Src="_header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="_menu" Src="_menu.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>SignGuestBook</title>
<meta content="Microsoft Visual Studio .NET 7.1" name=GENERATOR>
<meta content="Visual Basic .NET 7.1" name=CODE_LANGUAGE>
<meta content=JavaScript name=vs_defaultClientScript>
<meta content=http://schemas.microsoft.com/intellisense/ie5
name=vs_targetSchema>
</HEAD>
<body leftMargin=0 topMargin=0 MS_POSITIONING="GridLayout">
<form id=idSignGuestBook method=post runat="server">
<TABLE id=Table1 style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP:
8px"
borderColor=#ff3333 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
<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>
here" Height="24px" Width="312px"></asp:textbox></TD>
<TD><asp:requiredfieldvalidator id=RequiredFieldValidator1
runat="server" Width="7px" ControlToValidate="idname"
ErrorMessage="*"></asp:requiredfieldvalidator></TD>
<TD></TD></TR>
state will do" Width="312px"></asp:textbox></TD>
<TD><asp:requiredfieldvalidator id=RequiredFieldValidator2
runat="server" ControlToValidate="idlocation"
ErrorMessage="*"></asp:requiredfieldvalidator></TD>
<TD></TD></TR>
<TR>
<TD style="WIDTH: 172px" align=right>Website:</TD>
<TD><asp:textbox 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>Email:</TD>
<TD><asp:textbox id=idemail runat="server" ToolTip="valid e-mail
goes here" Width="312px"></asp:textbox></TD>
<TD></TD>
<TD></TD></TR>
comment here" Height="136px" Width="312px"
TextMode="MultiLine"></asp:textbox></TD>
<TD><asp:requiredfieldvalidator id=RequiredFieldValidator3
runat="server" ControlToValidate="idcomment"
ErrorMessage="*"></asp:requiredfieldvalidator></TD>
<TD></TD></TR>
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></TD>
<TD></TD></TR>
<TR>
<TD style="WIDTH: 172px">
<asp:TextBox id=TextBox1 runat="server" Width="95px"
Visible="False"></asp:TextBox></TD>
<TD><asp:label 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%"><uc1:_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.OleDb
Imports Microsoft.VisualBasic
Public Class SignGuestBook
Inherits System.Web.UI.Page
Dim myConnection As OleDbConnection
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.ID = "idSignGuestBook"
End Sub
Protected WithEvents idname As System.Web.UI.WebControls.TextBox
Protected WithEvents idlocation As System.Web.UI.WebControls.TextBox
Protected WithEvents idwebsite As System.Web.UI.WebControls.TextBox
Protected WithEvents idemail As System.Web.UI.WebControls.TextBox
Protected WithEvents idcomment As System.Web.UI.WebControls.TextBox
Protected WithEvents idThankYou As System.Web.UI.WebControls.Label
Protected WithEvents idemailme As System.Web.UI.WebControls.CheckBox
Protected WithEvents RequiredFieldValidator1 As
System.Web.UI.WebControls.RequiredFieldValidator
Protected WithEvents RequiredFieldValidator2 As
System.Web.UI.WebControls.RequiredFieldValidator
Protected WithEvents RequiredFieldValidator3 As
System.Web.UI.WebControls.RequiredFieldValidator
Protected WithEvents Button1 As System.Web.UI.WebControls.Button
Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox
'NOTE: The following placeholder declaration is required by the Web Form
Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
myConnection = New
OleDbConnection(ConfigurationSettings.AppSettings("ConnectionString"))
End Sub
Sub AddNewGuest(ByVal sender As System.Object, ByVal e As
System.EventArgs) 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(InsertCmd,
myConnection)
MyCommand.Parameters.Add(New OleDbParameter("@strName",
OleDbType.Char))
MyCommand.Parameters("@strName").Value = idname.Text
MyCommand.Parameters.Add(New OleDbParameter("@stremail",
OleDbType.Char))
MyCommand.Parameters("@stremail").Value = idemail.Text
MyCommand.Parameters.Add(New OleDbParameter("@strhttp",
OleDbType.Char))
MyCommand.Parameters("@strhttp").Value = idwebsite.Text
MyCommand.Parameters.Add(New OleDbParameter("@strcomment",
OleDbType.Char))
MyCommand.Parameters("@strcomment").Value = idcomment.Text
MyCommand.Parameters.Add(New OleDbParameter("@strlocation",
OleDbType.Char))
MyCommand.Parameters("@strlocation").Value = idlocation.Text
MyCommand.Parameters.Add(New OleDbParameter("@tf",
OleDbType.Boolean))
MyCommand.Parameters("@tf").Value = idemailme.Checked
'MyCommand.Parameters.Add(New OleDbParameter("@timesubmit",
OleDbType.DBTime))
'MyCommand.Parameters("@timesubmit").Value = DateTime.Today
MyCommand.Connection.Open()
MyCommand.ExecuteNonQuery()
MyCommand.Connection.Close()
myConnection.Close()
idname.Text = " "
idemail.Text = " "
idwebsite.Text = " "
idcomment.Text = " "
idlocation.Text = " "
idThankYou.Visible = True
End Sub
End Class
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="_Footer" Src="_Footer.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="SignGuestBook.aspx.vb" Inherits="Ruiz.SignGuestBook"%>
<%@ Register TagPrefix="uc1" TagName="_header" Src="_header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="_menu" Src="_menu.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>SignGuestBook</title>
<meta content="Microsoft Visual Studio .NET 7.1" name=GENERATOR>
<meta content="Visual Basic .NET 7.1" name=CODE_LANGUAGE>
<meta content=JavaScript name=vs_defaultClientScript>
<meta content=http://schemas.microsoft.com/intellisense/ie5
name=vs_targetSchema>
</HEAD>
<body leftMargin=0 topMargin=0 MS_POSITIONING="GridLayout">
<form id=idSignGuestBook method=post runat="server">
<TABLE id=Table1 style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP:
8px"
borderColor=#ff3333 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
<TD style="HEIGHT: 41px" width=200></TD></TR>runat="server"> said:</TD>
<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>
Sign Guest Book</TD></TR>
<TD><asp:textbox id=idname runat="server" ToolTip="Enter your nameName:*</TD>
here" Height="24px" Width="312px"></asp:textbox></TD>
<TD><asp:requiredfieldvalidator id=RequiredFieldValidator1
runat="server" Width="7px" ControlToValidate="idname"
ErrorMessage="*"></asp:requiredfieldvalidator></TD>
<TD></TD></TR>
<TD><asp:textbox id=idlocation runat="server" ToolTip="City andLocation:*</TD>
state will do" Width="312px"></asp:textbox></TD>
<TD><asp:requiredfieldvalidator id=RequiredFieldValidator2
runat="server" ControlToValidate="idlocation"
ErrorMessage="*"></asp:requiredfieldvalidator></TD>
<TD></TD></TR>
<TR>
<TD style="WIDTH: 172px" align=right>Website:</TD>
<TD><asp:textbox 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>Email:</TD>
<TD><asp:textbox id=idemail runat="server" ToolTip="valid e-mail
goes here" Width="312px"></asp:textbox></TD>
<TD></TD>
<TD></TD></TR>
<TD><asp:textbox id=idcomment runat="server" ToolTip="type anyComment:*</TD>
comment here" Height="136px" Width="312px"
TextMode="MultiLine"></asp:textbox></TD>
<TD><asp:requiredfieldvalidator id=RequiredFieldValidator3
runat="server" ControlToValidate="idcomment"
ErrorMessage="*"></asp:requiredfieldvalidator></TD>
<TD></TD></TR>
an e-mail and check this box, you'll be e-mailed automatically with new<asp:checkbox id=idemailme runat="server" ToolTip="if you enter
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>
*<FONT size=2>=Required</FONT></TD></asp:Button>
<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:label 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%"><uc1:_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.OleDb
Imports Microsoft.VisualBasic
Public Class SignGuestBook
Inherits System.Web.UI.Page
Dim myConnection As OleDbConnection
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.ID = "idSignGuestBook"
End Sub
Protected WithEvents idname As System.Web.UI.WebControls.TextBox
Protected WithEvents idlocation As System.Web.UI.WebControls.TextBox
Protected WithEvents idwebsite As System.Web.UI.WebControls.TextBox
Protected WithEvents idemail As System.Web.UI.WebControls.TextBox
Protected WithEvents idcomment As System.Web.UI.WebControls.TextBox
Protected WithEvents idThankYou As System.Web.UI.WebControls.Label
Protected WithEvents idemailme As System.Web.UI.WebControls.CheckBox
Protected WithEvents RequiredFieldValidator1 As
System.Web.UI.WebControls.RequiredFieldValidator
Protected WithEvents RequiredFieldValidator2 As
System.Web.UI.WebControls.RequiredFieldValidator
Protected WithEvents RequiredFieldValidator3 As
System.Web.UI.WebControls.RequiredFieldValidator
Protected WithEvents Button1 As System.Web.UI.WebControls.Button
Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox
'NOTE: The following placeholder declaration is required by the Web Form
Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
myConnection = New
OleDbConnection(ConfigurationSettings.AppSettings("ConnectionString"))
End Sub
Sub AddNewGuest(ByVal sender As System.Object, ByVal e As
System.EventArgs) 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(InsertCmd,
myConnection)
MyCommand.Parameters.Add(New OleDbParameter("@strName",
OleDbType.Char))
MyCommand.Parameters("@strName").Value = idname.Text
MyCommand.Parameters.Add(New OleDbParameter("@stremail",
OleDbType.Char))
MyCommand.Parameters("@stremail").Value = idemail.Text
MyCommand.Parameters.Add(New OleDbParameter("@strhttp",
OleDbType.Char))
MyCommand.Parameters("@strhttp").Value = idwebsite.Text
MyCommand.Parameters.Add(New OleDbParameter("@strcomment",
OleDbType.Char))
MyCommand.Parameters("@strcomment").Value = idcomment.Text
MyCommand.Parameters.Add(New OleDbParameter("@strlocation",
OleDbType.Char))
MyCommand.Parameters("@strlocation").Value = idlocation.Text
MyCommand.Parameters.Add(New OleDbParameter("@tf",
OleDbType.Boolean))
MyCommand.Parameters("@tf").Value = idemailme.Checked
'MyCommand.Parameters.Add(New OleDbParameter("@timesubmit",
OleDbType.DBTime))
'MyCommand.Parameters("@timesubmit").Value = DateTime.Today
MyCommand.Connection.Open()
MyCommand.ExecuteNonQuery()
MyCommand.Connection.Close()
myConnection.Close()
idname.Text = " "
idemail.Text = " "
idwebsite.Text = " "
idcomment.Text = " "
idlocation.Text = " "
idThankYou.Visible = True
End Sub
End Class