澄清:我是智利人,所以我的英语不是很完美,很抱歉拼写错误。
嗨,我正在使用 c# 中的图像。
我尝试在第一次打开页面时放置一个示例图像,我为此使用了 post back,但是当我按下一个按钮时,执行 post back 部分中的代码(这是正确的),然后执行 Button代码,但随后,它再次传递给 Page_Load 方法,并执行“不回发”部分,我不知道为什么。
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
//Is post back
}
else // Is not post back
{
//Make things only when the page is open for the first time
}
}