Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Insert on DetailsView inside ModaPopUpExtender doesn't work

$
0
0

I have a DetailsView inside a ModalPopUp that I only want to use to insert data. The ModalPopUp is attached to a stand-alone button on the page. When I click on Insert nothing happens, no postback and no data is added to the database.

The database is in SQL Server Express 2008.

18" runat="server" CssClass="newStyle1div" Height="556px"
                                        Width="776px"><asp:SqlDataSource ID="SqlDataSource14" runat="server"
                                            ConnectionString="<%$ ConnectionStrings:WildLife_EducationConnectionString %>"
                                            DeleteCommand="DELETE FROM [tblInstructor] WHERE [InstructorID] = @original_InstructorID"
                                            InsertCommand="INSERT INTO [tblInstructor] ([InstructorLastName], [InstructorFirstName], [InstructorMiddleInitial], [InstructorSuffix], [InstructorEmail], [InstructorPhoneNumber]) VALUES (@InstructorLastName, @InstructorFirstName, @InstructorMiddleInitial, @InstructorSuffix, @InstructorEmail, @InstructorPhoneNumber)"
                                            OldValuesParameterFormatString="original_{0}"
                                            SelectCommand="SELECT * FROM [tblInstructor]"

                                            UpdateCommand="UPDATE [tblInstructor] SET [InstructorLastName] = @InstructorLastName, [InstructorFirstName] = @InstructorFirstName, [InstructorMiddleInitial] = @InstructorMiddleInitial, [InstructorSuffix] = @InstructorSuffix, [InstructorEmail] = @InstructorEmail, [InstructorPhoneNumber] = @InstructorPhoneNumber WHERE [InstructorID] = @original_InstructorID"><InsertParameters><asp:Parameter Name="InstructorLastName" Type="String" /><asp:Parameter Name="InstructorFirstName" Type="String" /><asp:Parameter Name="InstructorMiddleInitial" Type="String" /><asp:Parameter Name="InstructorSuffix" Type="String" /><asp:Parameter Name="InstructorEmail" Type="String" /><asp:Parameter Name="InstructorPhoneNumber" Type="String" /></InsertParameters></asp:SqlDataSource><br /><asp:Button ID="btInsertInstructor" runat="server" Text="Add New Instructor" /><asp:ModalPopupExtender ID="btInsertInstructor_ModalPopupExtender"
                                            runat="server" DynamicServicePath="" Enabled="True"
                                            PopupControlID="dvInsertInstructors" TargetControlID="btInsertInstructor"
                                            BackgroundCssClass="modalBackground"></asp:ModalPopupExtender><br /><br /><span class="style19"><asp:DetailsView ID="dvInsertInstructors" runat="server"
                                            AutoGenerateRows="False" CssClass="newStyle1div"
                                            DataKeyNames="InstructorID" DataSourceID="SqlDataSource14"
                                            DefaultMode="Insert" Height="50px" Width="684px" CellPadding="4"<InsertItemTemplate><....Template fields...></asp:DetailsView>




Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>