protected void bind_formview(string mode) { //have to use a collection as formview needs to bind to enumerable VoyageTableCollection _tbl = new VoyageTableCollection(); if (mode != "Insert") { int _pid = wwi_func.vint(wwi_security.DecryptString(get_token("pid").ToString(), "publiship")); VoyageTable _vt = new VoyageTable(_pid); _tbl.Add(_vt); } else { VoyageTable _vt = new VoyageTable(); _tbl.Add(_vt); } this.fmvVoyage.DataSource = _tbl; this.fmvVoyage.DataBind(); }