难道我有办法从表面上说一刀切的方法,需要两个论点/价值? 请检查以下法典:
private void ddl_Eval_SelectedIndexChanged (Object sender, System.EventArgs e)
{
dtEval = new DataTable();
dtEval = data.GetEvaluation2();
DataView dvEval = dtEval.DefaultView;
string xmlDoc = String.Empty;
foreach (DataRowView drvEval in dvEval)
{
if (drvEval.Row["EvaluationID"].ToString() == ddl_Eval.SelectedValue.ToString())
{
xmlDoc = drvEval.Row["EvalAnswers"].ToString();
}
}
XDocument xdoc = new XDocument();
xdoc = XDocument.Parse(xmlDoc);
foreach (XElement child in xdoc.Root.Elements("Answer"))
{
//Response.Write(child.Attribute("item").Value + " " + child.Value + "<br />");
//THIS IS WHERE I NEED TO PUT THE CODE SO I CAN SEND THE VALUE
//OF THE ATTRIBUTE "item" AND THE VALUE OF THE child node itself.
}
}
这里还有XML的阐述:
<ANSWERS>
<Answer item="ddl_3">A</Answer>
<Answer item="ddl_8">A</Answer>
<Answer item="ddl_13">Y</Answer>
<Answer item="ddl_16">Y</Answer>
<Answer item="ddl_19">Y</Answer>
<Answer item="ddl_22">N</Answer>
<Answer item="ddl_26">Y</Answer>
<Answer item="ddl_30">N</Answer>
<Answer item="ddl_34">Y</Answer>
<Answer item="ddl_38">N</Answer>
<Answer item="ddl_42">StarLight</Answer>
</ANSWERS>
这里的网页是,我想用javascript来改变<条码>的选用数值<>。
是否可能? 我想提出这两个论点/价值,以便javascript能够改变<select>
上我在该页上的控制。