首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

无法从textbox获得中文字符?该如何解决

2012-04-13 
无法从textbox获得中文字符?????%@RegisterTagPrefix cc1 Namespace book09 %%@Pagelanguage c

无法从textbox获得中文字符?????
<%@   Register   TagPrefix= "cc1 "   Namespace= "book09 "   %>
<%@   Page   language= "c# "   Inherits= "book09.Migrated_Login "   codePage= "936 "   CodeFile= "Login.aspx.cs "   %>
<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.0   Transitional//EN "   >
<HTML>
  <HEAD>
    <title> 聊天室 </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.microsoft.com/intellisense/ie5 "   name= "vs_targetSchema ">
    <LINK   href= "global.css "   type= "text/css "   rel= "stylesheet ">
  </HEAD>
  <body>
    <form   id= "Form1 "   method= "post "   runat= "server ">
      <table   height= "74% "   cellSpacing= "1 "   cellPadding= "1 "   width= "100% "   border= "0 ">
        <tr>
          <td   height= "66 "> <div   align= "center "> <FONT   face= "宋体 "> <a   href= "http://www.gucci14.cn "   target= "_blank "> 欢迎光临股奇论坛临时聊天室 </a>   </FONT> </div> </td>
        </tr>
        <tr>
          <td   align= "center "   style= "height:   222px ">
                  <asp:Label   ID= "Label1 "   runat= "server "   Text= "用户名: "   Width= "84px "> </asp:Label>
                  &nbsp; <asp:TextBox   ID= "UserName "   runat= "server "> </asp:TextBox> &nbsp; <br   />
                  <asp:Label   ID= "Label2 "   runat= "server "   Text= "密       码: "   Width= "77px "> </asp:Label>
                  <asp:TextBox   ID= "PassWord "   runat= "server "   TextMode= "Password "> </asp:TextBox>
                  <br   />
                  <asp:Button   ID= "Button1 "   runat= "server "   OnClick= "Button1_Click "   Text= "登录 "   />
                  <asp:Button   ID= "Button2 "   runat= "server "   Text= "取消 "   OnClick= "Button2_Click "   /> </td>
        </tr>
        <tr>
          <td   align= "center ">


            <asp:Label   id= "lblMessage "   runat= "server "   ForeColor= "Red "> </asp:Label>
          </td>
        </tr>
      </table>
    </form>
</body>
</HTML>


----------------------------------
  string   Uname   =   this.UserName.Text.Trim().ToString();
获得是空字符串   晕死

[解决办法]
你什么时候取?
[解决办法]
那个呀?
[解决办法]
还有后台的代码呢?
[解决办法]
主要是看你取值是在哪个函数中
[解决办法]
查下page-load是不是把textbox重绑了
[解决办法]
怎么回事?

热点排行