LA.NET [EN]

May 15

Dynamic data pages: inserting new items

Posted in ASP.NET      Comments Off on Dynamic data pages: inserting new items

Today”s post is all about the new DynamicInsert control. This new control will let you do a single type of operation: inserting a new element on the database. It uses a DetailsView control to generate the layout, so everything I”ve said about the DynamicList and DynamicDetails control remains true. here”s the shortest line of markup you need to use this control:

<asp:DynamicInsert runat=”server” id=”myInsert” ControlID=”details” />

As you might expect by now, you can associate this control with an existing DetailsView control (which is cool because it”ll let you define several of its properties without having to write any procedural code). Just keep in mind that you can not associate a DetailsView control with a DynamicDetails and DynamicInsert control at the same time. If you do that, the DetailsView control will only perform the insertion operation and you”ll loose the ability to show elements in that control.