Существует много способов сделать XSS (См. http://ha.ckers.org/xss.html ), и очень трудно поймать.
я лично делегирую это к текущей платформе, которую я использую (Воспламенитель кода, например). В то время как не прекрасный, это могло бы поймать больше, чем моя рука, сделанная стандартными программами когда-либо сделать.
Попробуйте это
DataRowView dr = (DataRowView)DataBinder.GetDataItem(e.Item);
используя Dr.Item.ItemArray вы можете получить доступ ко всему ряду.
Perhaps try to use the ListViewDataItem
property to access the properties of the underlying data object to which the object is bound. The ListViewDataItem property is only available during and after the ItemDataBound events of the control and usually corresponds to a record in your data source object.
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listviewdataitem.aspx
Below is an example.
protected void listProducts_ItemDataBound(object sender, ListViewItemEventArgs e)
{
if (e.Item.ItemType == ListViewItemType.DataItem)
{
ListViewDataItem dataItem = (ListViewDataItem)e.Item;
string prodtype = (string)DataBinder.Eval(dataItem, "ProductType");
// ...
}
}