Click here to Skip to main content
16,021,417 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a webpage which has been developed using entity framework model and it contains form view and dynamic controls which have been populated automatically.
My question is,
I would like to populate <asp:DynamicControl> value from existing DynamicControls from the same form while inserting value. For example, like onblur event.


</<asp:Panel ID="pnlAppForm"  runat="server" Visible="false">
        <asp:FormView ID="ApplicationFormView" runat="server" 
        DataSourceID="App1DataSource" DataKeyNames="ApplicationID" 
        DefaultMode="Insert" oniteminserted="ApplicationFormView_ItemInserted" 
    oniteminserting="ApplicationFormView_ItemInserting">
        <EditItemTemplate>

        </EditItemTemplate>
        <InsertItemTemplate>
        
        <h2>Sample Application</h2>

        <table class="appTable">
        <tr>
            <td>First Value</td>
            <td><asp:DynamicControl ID="FirstValueDynamicControl" runat="server" DataField="Length" 
                Mode="Insert" ValidationGroup="Insert" /></td>
        </tr>

        <tr>
            <td>Second Value</td>
            <td> <asp:DynamicControl ID="SecondValueDynamicControl" runat="server" 
                DataField="Breath" Mode="Insert" ValidationGroup="Insert" /></td>
        </tr>
	<tr>
            <td>Third Value</td>
            <td> <asp:DynamicControl ID="ThirdValueDynamicControl" runat="server" 
                DataField="Total" Mode="Insert" ValidationGroup="Insert" /></td>
        </tr>
	</table>
<asp:Button ID="InsertButton" runat="server" CausesValidation="true" 
                CommandName="Insert" Text="Submit" CssClass="submitbutton" ValidationGroup="Insert" TabIndex="27" />
        </InsertItemTemplate>
        <ItemTemplate>

        </ItemTemplate>
    </asp:FormView>
 </asp:Panel><pre lang="text">
pre>
Posted
Updated 3-Jul-15 0:25am
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900