| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2694 人关注过本帖
标题:大家帮我看看,System.FormatException: 输入字符串的格式不正确。
取消只看楼主 加入收藏
jx249869703
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2010-10-28
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:6 
大家帮我看看,System.FormatException: 输入字符串的格式不正确。
“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------

输入字符串的格式不正确。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.FormatException: 输入字符串的格式不正确。

源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。  

堆栈跟踪:


[FormatException: 输入字符串的格式不正确。]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2753235
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +102
   System.Int32.Parse(String s) +20
   GPDN.JSW.eFilesX.admin.deptadd.Page_Load(Object sender, EventArgs e) in E:\Projects\NMeFilesX\admin\deptadd.aspx.cs:47
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
搜索更多相关主题的帖子: System 字符 格式 输入 
2010-10-28 16:27
jx249869703
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2010-10-28
收藏
得分:0 
那个。。。看不懂呀,我这个是别人给我的
我给你看源代码你帮我看看好吗,是要index.aspx这个还是上边显示出错的 E:\Projects\NMeFilesX\admin\deptadd.aspx
得看哪个呀?
2010-10-28 16:55
jx249869703
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2010-10-28
收藏
得分:0 
index源代码:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="GPDN.JSW.eFilesX.index" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.

<%@ Register Assembly="ZLTextBox" Namespace="BaseText" TagPrefix="baseTextBox" %>

<html xmlns="http://www. >
<head id="Head1" runat="server">
    <title>欢迎访问<%=Application["SoftName"]%></title>
    <META http-equiv="Content-Type" content="text/html; charset=gb2312">
    <style type="text/css">
    <!--
    body,td,th {
        font-size: 12px;
    }
    body {
        margin: 0px;
        background-image: url(img/bg.gif);
    }
    a{ color:#0E72A6;text-decoration: none;}
    input{ height:13px;}
    .body_center{ width:851px; background:#FFFFFF; margin:0px auto;}
    .top{width:839px;}
    .menu,.select{width:837px;}
    .top{  background:url(img/topbg.jpg) repeat-x; height:45px; margin:6px auto 1px auto;}
    .menu{ background:url(img/menu_bg.gif) repeat-x; height:25px; border:1px #B4B4B4 solid; margin:2px auto;}
    .menu a{ color:#000000;text-decoration: none;}
    .select{ background:url(img/menu_bg3.gif) repeat-x; height:25px; border:1px #ABB9C4 solid; margin:1px auto;}

    .tr_bg1{ background:#E6EBEF;}
    .tr_bg2{ background:#F4F8F9;}

    .title_2{width:837px; margin:2px auto; border:1px #ADBAC3 solid; background:url(img/title_bg.gif) repeat-x}
    .content{width:837px; margin:2px auto; border:1px #ADBAC3 solid; background:url(img/content_bg.gif) repeat-x;}
    .foot{ height:60px; background:#E7F0F5 url(img/foot_bg.gif) repeat-x; text-align:center; line-height:22px; padding-top:15px;color:#003E8A;}
    -->
    </style>
</head>
<body>
<form id="frmindex" runat="server">
<div class="body_center">
<div class="top">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td height="45"><img src="img/top.jpg" border="0" /></td>
      <td width=200 vAlign="middle" align="right">
        <table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
            <tr height=5px><td></td></tr>
            <tr>
                <td vAlign="bottom" noWrap align="center" style="font-size:14px; color:#FFFFFF;"><asp:label id="lblDate" runat="server"></asp:label></td>
            </tr>
            <tr>
                <td align="center" style="font-size:14px; color:#FFFFFF;"><asp:label id="lblWeek" runat="server"></asp:label></td>
            </tr>
        </table>
    </td>
    </tr>   
  </table>
</div>
<div class="menu">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><img src="img/menu_pic1.gif" /></td>
    <td width="15" align="center"><img src="img/down.gif" width="15" height="16" /></td>
    <td width="90" align="center"><a href="sysindex.aspx">进入上传\下载</a></td>
    <td width="15"><img src="img/exit.gif" width="15" height="17" /></td>
    <td width="65" align="center"><a href="exit.aspx">安全退出</a></td>
  </tr>
</table>
</div>


<div class="select">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td width="35" height="25" align="center"><img src="img/2.gif" /></td>
    <td width="90"><b>按标题查询:</b></td>
    <td width="110px" align="center"><asp:textbox id="txtQueryTitle" runat="server" Width=150px></asp:textbox></td>
    <td width="115px" align="right">
    <asp:dropdownlist id="ddlQueryUnit" runat="server" DataValueField="ID" DataTextField="DeptName" Width="100px"
        BackColor="#C3D9E7">
        <asp:ListItem Value="0" Selected="True">选择处室</asp:ListItem>
    </asp:dropdownlist>
    </td>
    <td width="120px" align="right" nowrap><baseTextBox:ZLTextBox ID="txtQueryTime" InputType="date" IsDisplayTime="false" runat="server" Width=100px></baseTextBox:ZLTextBox></td>
    <td align="left" width="20px"><img src="img/datetime.gif" style="cursor:hand;" onclick="frmindex.txtQueryTime.focus();" /></td>
    <td><asp:ImageButton ID="imgBtnQuery_File" runat="server" ImageUrl="img/search.gif" Width="62px" Height="18px" OnClick="imgBtnQuery_File_Click"/></td>
  </tr>
</table>
</div>

</div>
<div class="body_center">
  <table width="839" align="center" cellpadding="4" cellspacing="1" style="border:1px #C3D9E7 solid;margin:1px auto;">
    <tr bgcolor="#d3eac6" style="background:url(img/menu_bg2.gif) repeat-x">
      <th align="center">文件标题</th>
      <th width="80" align="center">发布单位</th>
      <th width="80" align="center">发布时间</th>
      <th width="250" align="center">接收单位</th>
    </tr>
    <div id="File_Info" runat="server"></div>   
  </table>
</div>

<div class="body_center">
<table width="839" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="209" valign="top" style="background:url(img/denglu_bg.gif) repeat-x; border:1px #ADBAC3 solid;">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td style="background:url(img/menu_bg2.gif) repeat-x"><img src="img/gonggao.gif" /></td>
      </tr>
    </table>
    <marquee direction="up" height="150" width="100%" scrollamount=1 scrolldelay=60 onmouseover='this.stop()' onmouseout='this.start()'>
        <div id="scrBulletin" runat="server"></div>
    </marquee>
    </td>
    <td width="3"></td>
    <td width="630" valign="top">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr valign="top">
    <td valign="top" width="314" style="border:1px #CCCCCC solid; background:url(img/content_bg.gif) repeat-x; padding-bottom:3px;">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="30" height="30" align="center"><img src="img/4.gif" width="14" height="16" /></td>
        <td><span style="font-size:14px; color:#0F73A7; font-weight:800;">各旗县下载情况</span><span style="color:#0183D9;">[应下/已下]</span></td>
      </tr>
      <tr>
      <td colspan=2>
      <table width="98%" align="center" cellpadding="4" cellspacing="1" bgcolor="#FFFFFF" style="border:1px #C6D9E8 solid">
            <TBODY vAlign="top">
                <div id="tblProvArray" runat="server"></div>
            </TBODY>
        </table>
      </td>
      </tr>
    </table>
    </td>
    <td width="2"></td>
    <td valign="top" width="314" style="border:1px #CCCCCC solid; background:url(img/content_bg.gif) repeat-x; padding-bottom:3px;">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="30" height="30" align="center"><img src="img/4.gif" width="14" height="16" /></td>
        <td><span style="font-size:14px; color:#0F73A7; font-weight:800;">盟市下载情况</span><span style="color:#0183D9;">[应下/已下]</span></td>
      </tr>
      <tr>
      <td colspan=2>
      <table width="98%" align="center" cellpadding="4" cellspacing="1" bgcolor="#FFFFFF" style="border:1px #C6D9E8 solid">
            <TBODY vAlign="top">
                <div id="tblGjArray" runat="server"></div>
            </TBODY>
        </table>
      </td>
      </tr>
    </table>
    </td>
    </tr>
    <tr height=2>
        <td colspan=3></td>
    </tr>
    <tr>
    <td colspan=3 width="630" style="border:0px #CCCCCC solid; background:url(img/content_bg.gif) repeat-x; padding-bottom:3px;">
      <table width="100%" align="center" cellpadding="4" cellspacing="1" bgcolor="#FFFFFF" style="border:1px #C6D9E8 solid">
            <TBODY vAlign="top">
                <div id="divUnit3Array" runat="server"></div>
            </TBODY>
        </table>
      </td>
    </tr>
    </table>
    </td>   
  </tr>
</table>

<div class="title_2">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td height="22" align="left"><img src="img/xiazai.gif" width="298" height="22" /></td>
      <td width="120px" align="right" nowrap><baseTextBox:ZLTextBox ID="txtFileX" InputType="date" IsDisplayTime="false" runat="server" Width=100px></baseTextBox:ZLTextBox></td>
      <td align="left" width="20px"><img src="img/datetime.gif" style="cursor:hand;" onclick="frmindex.txtFileX.focus();" /></td>
      <td><asp:ImageButton ID="imgBtnLoginQuery" runat="server" ImageUrl="img/search.gif" Width="62px" Height="18px" OnClick="imgBtnLoginQuery_Click"/></td>
    </tr>
  </table>
</div>
<div style="width:839px; margin:1px auto;">
<table width="839" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td width="50%" valign="top" style="border:1px #CCCCCC solid; background:url(img/content_bg.gif) repeat-x; padding-bottom:7px;">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="30" height="25" align="center"><img src="img/1.gif" width="13" height="14" /></td>
        <td style="font-size:14px; color:#5E5E5E; font-weight:800;">上午 08:00--12:00</td>
      </tr>
    </table>
      <table width="90%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#ACB9C1">
        <tr>
          <td width="40" height="80" align="center" bgcolor="#FFFFFF">盟<br>市</td>
          <td bgcolor="#FFFFFF"><asp:label id="lblamGjLogin" runat="server" Width="280px" Height="80px"></asp:label>&nbsp;</td>
        </tr>
        <tr>
          <td height="80" align="center" bgcolor="#FFFFFF">旗<br />县</td>
          <td bgcolor="#FFFFFF"><asp:label id="lblamLogin" runat="server" Width="280px" Height="80px"></asp:label>&nbsp;</td>
        </tr>
      </table></td>
    <td width="3"></td>
    <td valign="top" style="border:1px #CCCCCC solid; background:url(img/content_bg.gif) repeat-x; padding-bottom:7px;">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="30" height="25" align="center"><img src="img/1.gif" width="13" height="14" /></td>
        <td style="font-size:14px; color:#5E5E5E; font-weight:800;">下午 14:00--18:00 </td>
      </tr>
    </table>
    <table width="90%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#ACB9C1">
      <tr>
        <td height="80" align="center" bgcolor="#FFFFFF" style="width: 93px">盟<br>市</td>
        <td bgcolor="#FFFFFF"><asp:label id="lblpmGjLogin" runat="server" Width="280px" Height="80px"></asp:label>&nbsp;</td>
      </tr>
      <tr>
        <td height="80" align="center" bgcolor="#FFFFFF" style="width: 93px">旗<br />县</td>
        <td bgcolor="#FFFFFF"><asp:label id="lblpmLogin" runat="server" Width="280px" Height="80px"></asp:label>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>

</div>

<div class="foot">
建议使用IE6以上版本浏览器浏览(分辨率:1024*768)<br />
版权所有:北京金乐电子技术有限责任公司&nbsp;&nbsp; 技术支持:北京金乐电子技术有限责任公司
</div>
</div>   
    </form>
</body>
</html>




deptadd源代码:


<%@ Page language="c#" Codebehind="deptadd.aspx.cs" AutoEventWireup="True" Inherits="GPDN.JSW.eFilesX.admin.deptadd" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
    <HEAD>
        <title>
            <%=Application["softName"]%>
        </title>
        <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
        <meta content="C#" name="CODE_LANGUAGE">
        <meta content="JavaScript" name="vs_defaultClientScript">
        <meta content="http://schemas. name="vs_targetSchema">
        <LINK href="../css/style.css" type="text/css" rel="stylesheet">
        <STYLE type="text/css">BODY {
    FONT-SIZE: 12px
}
.info {
    FONT-SIZE: 14px; WIDTH: 20px; COLOR: #ffffff; FONT-FAMILY: @Tahoma,@宋体
}
TABLE {
    FONT-SIZE: 12px; MARGIN: 0px; CURSOR: default
}
TR {
    HEIGHT: 20px
}
TR.over {
    FONT-SIZE: 12px; CURSOR: default; COLOR: #ffffff; BACKGROUND-COLOR: #000080
}
TR.out {
    FONT-SIZE: 12px; COLOR: #000000; BACKGROUND-COLOR: #efefef
}
DIV.rm_div {
    BORDER-RIGHT: #ffffff 1px outset; PADDING-RIGHT: 1px; BORDER-TOP: #ffffff 1px outset; DISPLAY: none; PADDING-LEFT: 1px; Z-INDEX: 201; FILTER: Alpha(Opacity='95' ); PADDING-BOTTOM: 1px; BORDER-LEFT: #ffffff 1px outset; WIDTH: 0px; PADDING-TOP: 1px; BORDER-BOTTOM: #ffffff 1px outset; POSITION: absolute; HEIGHT: 0px; BACKGROUND-COLOR: #efefef
}
HR.sperator {
    BORDER-RIGHT: #ffffff 1px inset; BORDER-TOP: #ffffff 1px inset; BORDER-LEFT: #ffffff 1px inset; WIDTH: 95%; BORDER-BOTTOM: #ffffff 1px inset
}
.w2kfont {
    FONT-SIZE: 8pt; FONT-FAMILY: Tahoma
}
        </STYLE>
    </HEAD>
    <body topMargin="5">
        <form id="Form1" method="post" runat="server">
            <table width="100%" border="0">
                <tr>
                    <td>系统管理-&gt;部门添加&gt;&gt;</td>
                    <td>
                        <div align="right"></div>
                    </td>
                </tr>
                <tr>
                    <td bgColor="#009933" colSpan="2" height="2"></td>
                </tr>
            </table>
            <br>
            <table cellSpacing="1" cellPadding="3" width="254" align="center" bgColor="#0a4790" border="0">
                <tr bgColor="#009933">
                    <td vAlign="middle" align="center" colSpan="2" height="30">添 加 部 门</td>
                </tr>
                <tr bgColor="#daebcf">
                    <td vAlign="middle">
                        <div align="center">单 位 简 称</div>
                    </td>
                    <td vAlign="middle">
                        <div align="left"><asp:textbox id="txtDispName" runat="server" Width="150px" MaxLength="10" ReadOnly="True"></asp:textbox></div>
                    </td>
                </tr>
                <tr bgColor="#daebcf">
                    <td vAlign="middle">
                        <div align="center">部 门 名 称</div>
                    </td>
                    <td vAlign="middle">
                        <div align="left"><asp:textbox id="txtDeptName" runat="server" Width="150px" MaxLength="10"></asp:textbox><asp:requiredfieldvalidator id="checkTechName" runat="server" ErrorMessage="*" ControlToValidate="txtDeptName"
                                Display="Dynamic"></asp:requiredfieldvalidator></div>
                    </td>
                </tr>
                <tr bgColor="#daebcf">
                    <td vAlign="middle">
                        <div align="center">显 示 序 列</div>
                    </td>
                    <td vAlign="middle">
                        <div align="left"><asp:textbox id="txtOrderID" runat="server" Width="150px" MaxLength="3"></asp:textbox><asp:requiredfieldvalidator id="checkLinkTel" runat="server" ErrorMessage="*" ControlToValidate="txtOrderID"
                                Display="Dynamic"></asp:requiredfieldvalidator></div>
                    </td>
                </tr>
                <tr bgColor="#daebcf">
                    <td vAlign="middle" colSpan="2"></td>
                </tr>
                <tr bgColor="#f0e8d8">
                    <td align="center" colSpan="2">
                        <asp:ImageButton id="imgSave" runat="server" ImageUrl="../img/save.gif"></asp:ImageButton>&nbsp;&nbsp;
                        <IMG style="CURSOR: hand" onclick="javascript:location.href='unitadmin.aspx'" src="../img/go_back.gif"></td>
                </tr>
            </table>
        </form>
    </body>
</HTML>
2010-10-29 09:19
jx249869703
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2010-10-28
收藏
得分:0 
麻烦你了啊,急死我了
2010-10-29 09:20
jx249869703
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2010-10-28
收藏
得分:0 
啊,我上传错了?
2010-10-29 11:23
jx249869703
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2010-10-28
收藏
得分:0 
啊,哪个是呀,你加我QQ好吗,我发给你看看:  249869703
谢谢啊
2010-10-29 21:10
jx249869703
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2010-10-28
收藏
得分:0 
已经解决了,打开SQL表,找到TBUNIT这个表
然后把系统管理员后面的100值改成1
。。。。
2010-11-01 12:44
快速回复:大家帮我看看,System.FormatException: 输入字符串的格式不正确。
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021088 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved