MustangPriMe
IS-IT--Management
I'm new to ASP.NET, coming from classic ASP, so apologies for what will be a simple problem for anyone with more than a couple of weeks experience, but at least it should be simple to answer!
I'm working on 2 pages currently, one with a DataList to list selected fields from a table, and a second with a FormView to edit all fields from a selected record, or add a new record.
I'd first appreciate someone to confirm my approach, and second to help with a small problem.
The datalist is fine - one field is formatted as a hyperlink to the edit.aspx page, passing the record ID as a querystring.
The FormView has edit as the default mode, and the querystring id as the parameter used for the select and update statements. The OnUpdated event uses a Response.Redirect to pass back to the list.aspx page.
All works fine, but is this the best/easiest approach? I've seen examples with the DataList and the FormView on the same page, but I don't want the user confronted with both views when editing/inserting.
What I'm trying to get to grips with at the moment is how to use that page to insert and delete records as well? How can I use a querystring such as ?mode=insert to change the function of that page, and return to the list page on completion?
Thanks in advance!
Paul
I'm working on 2 pages currently, one with a DataList to list selected fields from a table, and a second with a FormView to edit all fields from a selected record, or add a new record.
I'd first appreciate someone to confirm my approach, and second to help with a small problem.
The datalist is fine - one field is formatted as a hyperlink to the edit.aspx page, passing the record ID as a querystring.
The FormView has edit as the default mode, and the querystring id as the parameter used for the select and update statements. The OnUpdated event uses a Response.Redirect to pass back to the list.aspx page.
All works fine, but is this the best/easiest approach? I've seen examples with the DataList and the FormView on the same page, but I don't want the user confronted with both views when editing/inserting.
What I'm trying to get to grips with at the moment is how to use that page to insert and delete records as well? How can I use a querystring such as ?mode=insert to change the function of that page, and return to the list page on completion?
Thanks in advance!
Paul