Erro na publicação das páginas no servidor
06/10/2013
0
Olá pessoal, está dando erro nas páginas, no servidor local roda, mas qdo transferi para o servidor na net não.
Enviei as páginas via FTP...
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Cannot create an object of type 'System.Web.UI.WebControls.TextBoxMode' from its string representation 'Email' for the 'TextMode' property.
Source Error:
Line 42: <td>Email ADM:</td>
Line 43: <td>
Line 44: <asp:TextBox ID="txtEmail" runat="server" AutoCompleteType="Email" TextMode="Email"></asp:TextBox>
Line 45: <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtEmail" ErrorMessage="Preencha o Email de acesso">*</asp:RequiredFieldValidator>
Line 46: </td>
Source File: /adm/Usuarios.aspx Line: 44
Enviei as páginas via FTP...
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Cannot create an object of type 'System.Web.UI.WebControls.TextBoxMode' from its string representation 'Email' for the 'TextMode' property.
Source Error:
Line 42: <td>Email ADM:</td>
Line 43: <td>
Line 44: <asp:TextBox ID="txtEmail" runat="server" AutoCompleteType="Email" TextMode="Email"></asp:TextBox>
Line 45: <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtEmail" ErrorMessage="Preencha o Email de acesso">*</asp:RequiredFieldValidator>
Line 46: </td>
Source File: /adm/Usuarios.aspx Line: 44
Alexandre Alves
Curtir tópico
+ 0
Responder
Posts
07/10/2013
Alexandre Alves
segue código:
using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using MySql.Data; using MySql.Data.MySqlClient; using System.Web.Security; using System.Threading.Tasks; public partial class adm_Usuarios : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void bntCadastrar_Click(object sender, EventArgs e) { string StrCon = ConfigurationManager.ConnectionStrings["IPConnectionString"].ConnectionString; string SQL = "INSERT INTO im_user(nome, email, email2, senha, departamento, apelido, acesso, periodo, tel1, tel2, creci, endereco, rg, cpf, observacoes) VALUES ("; SQL += "@nome, @email, @email2, @senha, @departamento, @apelido, @acesso, @periodo, @tel1, @tel2, @creci, @endereco, @rg, @cpf, @observacoes)"; using (MySqlConnection conn = new MySqlConnection(StrCon)) { using (MySqlCommand cmd = new MySqlCommand(SQL, conn)) { conn.Open(); cmd.Parameters.AddWithValue("@nome", txtNome.Text); cmd.Parameters.AddWithValue("@email", txtEmail.Text); cmd.Parameters.AddWithValue("@email2", txtEmail2.Text); cmd.Parameters.AddWithValue("@senha", txtSenha.Text); cmd.Parameters.AddWithValue("@departamento", ddlAcesso.Text); cmd.Parameters.AddWithValue("@apelido", txtApelido.Text); cmd.Parameters.AddWithValue("@acesso", ddlAcesso.Text); cmd.Parameters.AddWithValue("@periodo", ddlPeriodo.Text); cmd.Parameters.AddWithValue("@tel1", txtTel1.Text); cmd.Parameters.AddWithValue("@tel2", txtTel2.Text); cmd.Parameters.AddWithValue("@creci", txtCreci.Text); cmd.Parameters.AddWithValue("@endereco", txtEndereco.Text); cmd.Parameters.AddWithValue("@rg", txtRG.Text); cmd.Parameters.AddWithValue("@cpf", txtCPF.Text); cmd.Parameters.AddWithValue("@observacoes", txtObs.Text); if (cmd.ExecuteNonQuery() > 0) { lblMsg.Text = "Cad Okey"; } else { lblMsg.Text = "Cad Erro"; } conn.Close(); } } } }
Responder
Clique aqui para fazer login e interagir na Comunidade :)