团队我有一个这样的DOM,其中日期选择器ID是明确的但是作为属性readonly =“readonly”,在执行时它显示为元素不可见。请帮忙
答案 0 :(得分:0)
你可以使用Javascript删除readonly属性,找到它可以帮助你的下面的代码。
class YourClass
{
private DataTable dt { get; set; }
private int CurrentRow { get; set; }
private void SomeMethod()
{
OleDbDataAdapter dAdap = new OleDbDataAdapter(command);
dt = new DataTable();
dAdap.Fill(dt);
CurrentRow = 0;
AssignToRow();
}
private void AssignToRow()
{
var row = dt.Rows[CurrentRow];
lblQuest.Text = row["QUESTION"].ToString();
btnA.Text = row["C1"].ToString();
btnB.Text = row["C2"].ToString();
btnC.Text = row["C3"].ToString();
btnD.Text = row["C4"].ToString();
}
private void NextButton_Click(object sender, EventArgs e)
{
CurrentRow++;
AssignToRow();
}
}