textfile.txt
来自「《圣殿祭司的ASP.NET 2.0开发详解——使用C#》光盘内容.包含了书籍所含」· 文本 代码 · 共 26 行
TXT
26 行
public partial class ShoppingCode : System.Web.UI.Page
{
...略
//读取TextBox输入文字
protected void btnReadInput_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(txtInput.Text))
{
txtMsg.Text = "您输入的文字是:" + txtInput.Text;
}
}
//读取TreeView的节点
protected void btnRead_Click(object sender, EventArgs e)
{
txtMsg.Text="";
TreeView myTreeView = (TreeView)Master.FindControl("TreeView1");
if (myTreeView != null)
{
for (int i = 0; i < myTreeView.Nodes[0].ChildNodes.Count; i++)
{
txtMsg.Text+=myTreeView.Nodes[0].ChildNodes[i].Text + "<BR/>";
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?