// Get the value of TextBox1 from the page that
// posted to this page.
text = ((TextBox)PreviousPage……
[/Quote]
没有明白我的意思。如果如果只是一个简单的非空验证我用JS就解决了 还用后台代码?
// Get the value of TextBox1 from the page that
// posted to this page.
text = ((TextBox)PreviousPage.FindControl(……
[/Quote]这里取到了那边的控件的值了,具体怎么对这里操作随便你
// Get the value of TextBox1 from the page that
// posted to this page.
text = ((TextBox)PreviousPage.FindControl("TextBox1")).Text;
// Check for an empty string.
if (text != "")
PostedLabel.Text = "The string posted from the previous page is "
+ text + ".";
else
PostedLabel.Text = "An empty string was posted from the previous page.";
}