Hi Bob,
that's pretty much exactly what I have. Can I see the code for saving? Also how do you handle unbound combos/dropdownlists?
>Frank,
>
>Here is what I do:
>
>For each object I have in my app I have a list form which contains a grid of items I want to edit. For this example, I will use Client as my business object. On my client list grid I have a link on each line to edit the existing client. I also have an Add Button on the screen that will be used for adding a new client. When you click the link for an existing client in the grid the following redirect takes place:
>
>
>Response.Redirect"ClientEditForm.aspx?clientID={0}"
>
>
>The {0} string gets filled with the unique client id of the selected record. This is done by my grid.
>
>When the Add Client button is depressed the following redirect takes place:
>
>
>Response.Redirect("ClientEditForm.aspx?ClientID=0")
>
>Notce the value I pass is 0 (zero). This will be an indicator to the edit form that we want to add a new record.
>
>And lastly, here is the page_load for the ClientEdit form"
>
>
> // Instantiate the Business objects and register with the form
> this.oClient = (Client)this.RegisterBizObj(new Client());
> // Retrieve the client id passed by the page sending the request
> this.iClientID = int.Parse(Request.QueryString["clientID"]);
> if (this.iClientID == 0)
> {
> // Add new client
> this.oClient.NewEntity();
> }
> else
> {
> // Retrieve the specified client record
> this.oClient.GetClientbyClientID(this.iClientID);
> }
> Session["dsClient"] = this.oClient.DataSet;
>
>
>HTH
>;>Hi,
>>
>>the jump starts are great for editing existing data. Are there any examples on how to add new records in a web forms app?