奔跑在Springboot路上 2016-10-06 14:46 采纳率: 0%
浏览 1252
已结题

小白问题,关于asp.net的textbox的赋值问题

本人刚刚接触asp.net,现在对postback还是有点不清楚,想来请教这里的大虾。

有这样一个例子

textbox1的ontextchanged事件中,我想赋值给textbox2, 代码如下

protected void txtname_TextChanged(object sender, EventArgs e)
{
if (Request.Cookies["username"] != null)
{
if (Request.Cookies["username"].Value.Equals(txtname.Text.Trim()))
{
txtpwd.Attributes["value"] = Request.Cookies["userpwd"].Value;
//txtpwd.Text= Request.Cookies["userpwd"].Value;
}
}
}
为什么txtpwd.Text= Request.Cookies["userpwd"].Value这个不能实现呢?恳请給于解答,谢谢了

  • 写回答

2条回答 默认 最新

  • 奔跑在Springboot路上 2016-10-06 15:24
    关注

    问题已经解决了,因为是密码框的原因

    评论

报告相同问题?

悬赏问题

  • ¥20 fluent无法启动
  • ¥15 孟德尔随机化r语言运行问题
  • ¥15 pyinstaller编译的时候出现No module named 'imp'
  • ¥15 怎么把多于硬盘空间放到根目录下
  • ¥15 Matlab问题解答有两个问题
  • ¥50 Oracle Kubernetes服务器集群主节点无法访问,工作节点可以访问
  • ¥15 LCD12864中文显示
  • ¥15 在使用CH341SER.EXE时不小心把所有驱动文件删除了怎么解决
  • ¥15 gsoap生成onvif框架
  • ¥15 有关sql server business intellige安装,包括SSDT、SSMS。