We help IT Professionals succeed at work.

Update event not firing with sql datasource

MrAgile asked
Last Modified: 2013-11-07
HI There,

Can someone tell me why the update event in my gridview is not working? Do I need to add something into my code?

Sean - thanks in advance
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <asp:GridView ID="grdStoresCategories" DataKeyNames="jobID" DataSourceID="srcJobAds"
                                AutoGenerateColumns="true" AutoGenerateDeleteButton="true" AutoGenerateEditButton="true"
                                SelectedRowStyle-CssClass="selectedRow" CssClass="gridView" runat="server" jobTitle="true"
                            <asp:SqlDataSource ID="srcJobAds" ConnectionString="<%$ ConnectionStrings:toysruscomaudb %>"
                                SelectCommand="SELECT [jobID] ,[jobTitle], [jobLocation], [jobDescription] FROM [toys].[tblJobAds] Order By [datePosted]"
                                DeleteCommand="Delete FROM [toys].[tblJobAds] where [jobID] = @jobID" UpdateCommand="UPDATE [toys].[tblJobAds] SET jobTitle=@jobTitle, jobLocation=@jobLocation, jobDescription=@jobDescription where jobID = @jobID"
                                    <asp:Parameter Name="jobID" Type="Int32" />
                                    <asp:Parameter Name="jobTitle" Type="String" Size="250" />
                                    <asp:Parameter Name="jobLocation" Type="String" Size="50" />
                                    <asp:Parameter Name="jobDescription" Type="String" Size="1000" />
                                    <asp:Parameter Name="jobID" />

Open in new window

Watch Question

You tried setting the triggers property in your update panel to always?
This one is on us!
(Get your first solution completely free - no credit card required)
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.