I seem to always have problems with this. I have a button outside of the View that calls a function that needs an OrderNumber. I keep getting an error,
OrderNumber
There is no textbox in your details its a Cell. So u need to change your code.
string sOrderNumber = Order_DetailsView.Rows[0].Cells[0].Text.ToString(); int orderNumber = Int32.Parse(sOrderNumber);