Cannot fetch values from detailview

L

LamSoft

I cannot get values from detailview, here is the demo code...

<Fields>
<asp:BoundField DataField="serverip" HeaderText="Server IP"
ReadOnly="true" SortExpression="serverip" />
<asp:BoundField DataField="location" HeaderText="Location"
SortExpression="location" />
<asp:BoundField DataField="server_owner" HeaderText="Server
Owner" SortExpression="server_owner" />
<asp:BoundField DataField="application" HeaderText="Server
Application" SortExpression="application" />
<asp:BoundField DataField="backup_type" HeaderText="Backup Type"
SortExpression="backup_type" />
<asp:BoundField DataField="remark" HeaderText="Remark"
SortExpression="remark" />
<asp:BoundField DataField="server_id" HeaderText="server_id"
SortExpression="server_id"
Visible="False" />
</Fields>

protected void dv_ServerInformation_ItemUpdating(object sender,
DetailsViewUpdateEventArgs e)
{
Response.Write("Field: " +
dv_ServerInformation.Rows[0].Cells[1].Text + "<br/>");
Response.Write("Field: " +
dv_ServerInformation.Rows[1].Cells[1].Text + "<br/>");
Response.Write("Field: " +
dv_ServerInformation.Rows[2].Cells[1].Text + "<br/>");
Response.Write("Field: " +
dv_ServerInformation.Rows[3].Cells[1].Text + "<br/>");
Response.Write("Field: " +
dv_ServerInformation.Rows[4].Cells[1].Text + "<br/>");
Response.Write("Field: " +
dv_ServerInformation.Rows[5].Cells[1].Text + "<br/>");
Response.Write("Field: " +
dv_ServerInformation.Rows[6].Cells[1].Text + "<br/>");
Response.End();
}

The result is :
Field: 10.10.10.193
Field:
Field:
Field:
Field:
Field:
Field:

The readonly boundfield can be displayed only, other fields cannot get, why
???????????

Thanks a lot.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top