在使用ftp后页面无法正常工作 [英] page not working after putting on ftp

查看:78
本文介绍了在使用ftp后页面无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CustomerMaster.aspx.cs" Inherits="Admin_CustomerMaster" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .auto-style1 {
            text-align: left;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
          <div align ="right">
           <asp:Image ID="Image1" runat="server" Height="39px" ImageUrl="~/gnome-logout-icone-3872-128.png" />
           <asp:Image ID="Back" runat="server" Height="38px" ImageUrl="~/back.png" />
       </div>
       <div id="header" style="background-color: #000000">
     <h1 style="color: #3399FF" align="center">MNT
         <i style="color: #CC3300">Express Cargo</i></h1>
     <h4 style="color: #3399FF" align="center">( A Division Of MNT Transport India Pvt. LTD)
     </div>

    <div align="center" style="font-size: 30px; background-color: #3399FF">
    Customer Master
    </div>
    <div>
    <table align="center" bgcolor="#FF6600">
    <tr align="center">
    <td bgcolor="#999999">Branch Name</td>
    <td class="auto-style1">
        <asp:TextBox ID="BranchName" runat="server" AutoPostBack="True" BorderColor="Black" Width="120px"></asp:TextBox>
        </td>
    <td bgcolor="#999999">BranchCode</td>
    <td>
        <asp:TextBox ID="BranchCode" runat="server" AutoPostBack="True" BorderColor="Black" Width="120px"></asp:TextBox>
        </td>
    <td>
        &nbsp;</td>
    </tr>
    <tr align="center">
    <td bgcolor="#999999">Customer Code</td>
    <td class="auto-style1"><asp:TextBox ID="Customer_Code" runat="server" BorderColor="Black" Height="16px" style="text-align: left" Width="120px" AutoPostBack="True"></asp:TextBox></td>
    <td bgcolor="#999999">Service Tax</td>
    <td><asp:TextBox ID="Service_Tax" runat="server" BorderColor="Black" MaxLength="15" AutoPostBack="True" Width="120px"></asp:TextBox></td>
    <td>
        &nbsp;</td>
    </tr>
    <tr>
    <td bgcolor="#999999">Customer Name</td>
    <td class="auto-style1"><asp:TextBox ID="Customer_Name" runat="server" BorderColor="Black" Width="120px" AutoPostBack="True"></asp:TextBox></td>
    <td bgcolor="#999999">Pan No</td>
    <td><asp:TextBox ID="Pan_No" runat="server" BorderColor="Black" MaxLength="10" AutoPostBack="True" Width="120px"></asp:TextBox></td>
    <td>
        &nbsp;</td>
    </tr>
    <tr>
    <td bgcolor="#999999">Address</td>
    <td class="auto-style1"><asp:TextBox ID="Address" runat="server" BorderColor="Black" Width="120px" AutoPostBack="True"></asp:TextBox></td>
    <td bgcolor="#999999">TIN No</td>
    <td><asp:TextBox ID="TIN_No" runat="server" BorderColor="Black" MaxLength="11" AutoPostBack="True" Width="120px"></asp:TextBox></td>
    <td>
        &nbsp;</td>
    </tr>
    <tr>
    <td bgcolor="#999999">City</td>
    <td class="auto-style1"><asp:TextBox ID="City" runat="server" BorderColor="Black" AutoPostBack="True" Width="120px"></asp:TextBox></td>
    <td bgcolor="#999999">CST No</td>
    <td><asp:TextBox ID="CST_No" runat="server" BorderColor="Black" AutoPostBack="True" Width="120px"></asp:TextBox></td>
    <td>
        &nbsp;</td>
    </tr>
    <tr>
    <td bgcolor="#999999">State</td>
    <td class="auto-style1"><asp:DropDownList ID="State" runat="server" BackColor="#99CCFF" Height="43px"

            Width="149px">
        <asp:ListItem Value="1">Andaman and Nicobar Island</asp:ListItem>
        <asp:ListItem Value="2">Andhra Pradesh</asp:ListItem>
        <asp:ListItem Value="3">Arunachal Pradesh</asp:ListItem>
        <asp:ListItem Value="4">Assam</asp:ListItem>
        <asp:ListItem Value="5">Bihar</asp:ListItem>
        <asp:ListItem Value="6">Chandigarh</asp:ListItem>
        <asp:ListItem Value="7">Chhattishgarh</asp:ListItem>
        <asp:ListItem Value="8">Dadra and Nagar Haveli</asp:ListItem>
        <asp:ListItem Value="9">Daman and Diu</asp:ListItem>
        <asp:ListItem Value="10">Delhi</asp:ListItem>
        <asp:ListItem Value="11">Goa</asp:ListItem>
        <asp:ListItem Value="12">Gujarat</asp:ListItem>
        <asp:ListItem Value="13">Haryana</asp:ListItem>
        <asp:ListItem Value="14">Himanchal Pradesh</asp:ListItem>
        <asp:ListItem Value="15">Jammu and Kashmir</asp:ListItem>
        <asp:ListItem Value="16">Jharkhand</asp:ListItem>
        <asp:ListItem Value="17">Karnataka</asp:ListItem>
        <asp:ListItem Value="18">Kerala</asp:ListItem>
        <asp:ListItem Value="19">Lakshdweep</asp:ListItem>
        <asp:ListItem Value="20">Madhya Pradesh</asp:ListItem>
        <asp:ListItem Value="21">maharashtra</asp:ListItem>
        <asp:ListItem Value="22">Manipur</asp:ListItem>
        <asp:ListItem Value="23">Mizoram</asp:ListItem>
        <asp:ListItem Value="24">Nagaland</asp:ListItem>
        <asp:ListItem Value="25">Odisha</asp:ListItem>
        <asp:ListItem Value="26">Pundicherry</asp:ListItem>
        <asp:ListItem Value="27">Punjab</asp:ListItem>
        <asp:ListItem Value="28">Rajasthan</asp:ListItem>
        <asp:ListItem Value="29">Sikkim</asp:ListItem>
        <asp:ListItem Value="30">Tamil Nadu</asp:ListItem>
        <asp:ListItem Value="31">Telangana</asp:ListItem>
        <asp:ListItem Value="32">Tripura</asp:ListItem>
        <asp:ListItem Value="33">Uttar Pradesh</asp:ListItem>
        <asp:ListItem Value="33">Uttarakhand</asp:ListItem>
        <asp:ListItem Value="35">West Bengal</asp:ListItem>
        </asp:DropDownList></td>
    <td bgcolor="#999999">Country</td>
    <td><asp:TextBox ID="Country" runat="server" BorderColor="Black" AutoPostBack="True" Width="120px">India</asp:TextBox></td>
    <td>
        &nbsp;</td>
    </tr>
    <tr>
    <td bgcolor="#999999">Phone No</td>
    <td class="auto-style1">
        <asp:TextBox ID="Phone_No" runat="server" BorderColor="Black" MaxLength="10" AutoPostBack="True" Width="120px"></asp:TextBox>
        </td>
    <td bgcolor="#999999">Mobile</td>
    <td>
        <asp:TextBox ID="Mobile" runat="server" BorderColor="Black" MaxLength="10" AutoPostBack="True" Width="120px"></asp:TextBox>
        </td>
    <td>
        &nbsp;</td>
    </tr>
    <tr>
    <td bgcolor="#999999">Pin Code</td>
    <td class="auto-style1"><asp:TextBox ID="Pin_Code" runat="server" BorderColor="Black" MaxLength="6" AutoPostBack="True" Width="120px"></asp:TextBox></td>
    <td bgcolor="#999999">Emil-id</td>
    <td><asp:TextBox ID="Emil_id" runat="server" BorderColor="Black" Width="120px" AutoPostBack="True"></asp:TextBox></td>
    <td>
        &nbsp;</td>
    </tr>
    </table>
    </div;asp:Button ID="Button1" runat="server" BackColor="#3399FF" BorderColor="Black"

                   Text="Submit" Width="102px" OnClick="Button1_Click" style="text-align: center" />
           </p>
    </form>

</body>
</html>







using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Data;

using System.Data.SqlClient;

using System.Configuration;

public partial class Admin_CustomerMaster : System.Web.UI.Page

{

SqlConnection con = new SqlConnection(ConfigurationMana ger.ConnectionStrings[\"amitpandeyConnectionString\"].ConnectionString);

protected void Page_Load(object sender, EventArgs e)

{

con.Open();

}

protected void Button1_Click(object sender, EventArgs e)

{

SqlCommand cmd = new SqlCommand(\"insert into Customer_Master values(’\" + BranchName.Text + \"’,’\" + BranchCode.Text + \"’,’\" + Customer_Code.Text + \"’,’\" + Customer_Name.Text + \"’,’\" + Address.Text + \"’,’\" + City.Text + \"’,’\" + State.SelectedItem + \"’,’\" + Phone_No.Text + \"’,’\" + Pin_Code.Text + \"’,’\" + Service_Tax.Text + \"’,’\" + Pan_No.Text + \"’,’\" + TIN_No.Text + \"’,’\" + CST_No.Text + \"’,’\" + Country.Text + \"’,’\" + Mobile.Text + \"’,’\" + Emil_id.Text + \"’)\", con);

cmd.ExecuteNonQuery();

con.Close();

}

}

The problem is that it is working fine wh en I am trying it on my local machine but when I put it on FTP then it is reloading every time when I click in A text boxes and when I click Submit then It shows me web config error.




using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
public partial class Admin_CustomerMaster : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["amitpandeyConnectionString"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
con.Open();
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand("insert into Customer_Master values('" + BranchName.Text + "','" + BranchCode.Text + "','" + Customer_Code.Text + "','" + Customer_Name.Text + "','" + Address.Text + "','" + City.Text + "','" + State.SelectedItem + "','" + Phone_No.Text + "','" + Pin_Code.Text + "','" + Service_Tax.Text + "','" + Pan_No.Text + "','" + TIN_No.Text + "','" + CST_No.Text + "','" + Country.Text + "','" + Mobile.Text + "','" + Emil_id.Text + "')", con);
cmd.ExecuteNonQuery();
con.Close();
}
}
The problem is that it is working fine when I am trying it on my local machine but when I put it on FTP then it is reloading every time when I click in A text boxes and when I click Submit then It shows me web config error.

推荐答案

Hi,

If u avoid the postback while clicking in text box means u set false an autopostback.then Check the Submit Buttton and Closing Div,It was not properly closed and Opened.please check ur code
Hi,
If u avoid the postback while clicking in text box means u set false an autopostback.then Check the Submit Buttton and Closing Div,It was not properly closed and Opened.please check ur code


这篇关于在使用ftp后页面无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆