Hi,
I have developed a user-control which gets bound to an id-field and then enables editing of records from (various) other sources (linked via this id). This is working fine, but I am struggling to save the data when the form is saved - obviously there's more to be done than "just" writing the id back.
I wouldn't like to add extra buttons for the "inner update", but was hoping to understand the ASP.net-mechanisms well enough to do this they way it should be done. Unfortunately I'm not getting anywhere (and time is running out), so I hope someone could share some insight on how to get this integration working, which events to look at etc.
Thanks in advance :)
Michael
Edit: thanks for your comments, I'm trying to give more details on the idea:
<FormView...
<EditItemTemplate...
<table...
<asp:Textbox text="<% Bind('bla1') %>...
<uc1:MyControl id1="<%# Bind('bla2') %> editeable="True"...
<asp:ImageButton CommandName="Update"...
...
<ItemTemplate...
<table...
<asp:Textbox text="<%# Bind('bla') %>...
<uc1:MyControl id1="bla" editeable="False"...
This user-control uc1 displays a whole lot of related records (based on id1) - and in edit-mode also enables editing/adding etc. of these "inner" records. Now, since users have a "standard-way" of saving-records, I don't want to interfere by adding a special save-method just because we happen to edit some internal records elsewhere. That shouldn't matter to the user, UI should behave the same. So that means that I'll have to take care of saving internally. But how do I know the user wants to save and what would be a best practice to handle this? Is there a way the user-control could be "notified" about the Update-event on the containing control, would I have to make it explicit by customizing the Update-command etc. We're trying to make it robust and general enough, so that it could easily be re-used. (Still hoping that doesn't contradict ;))