分配字符串时,viewstate保持为空

时间:2014-08-09 11:11:27

标签: c# asp.net

我正在为View状态分配文本并在另一个事件中使用它,但是viewstate仍为空,为什么?

if (txtSelectedID.Text != "")
{
    string ComplaintCode = Convert.ToString(row.Cells[4].Text);
    txtAssignComplaintCode.Text = ComplaintCode;
    ViewState["ComposeLetterSubject"] = txtSubject.Text + " " + "Complaint Code:" + " " + ComplaintCode;

}

0 个答案:

没有答案