Objectdatasource onupdating not firing

Soemtime there is case when i select a value in dropdownlist 1 then i am getting no value for dropdownlist 2. so i need to clear the items present in before in dropdownlist2. But I have written a formview whose bind fields are optionally set to invisible too, but that formview works anyway.

To String() Else Throw New Northwind Data Exception("Data not loaded for employee id.") End If Finally Try If Not (sdr Is Nothing) Then sdr. Close() Catch se As Sql Exception ' Log an event in the Application Event Log. Connection Strings("Northwind Connection") Dim sds As New Sql Data Source(cts. Move Next() ' The IEnumerable contains Data Row View objects. Current, Data Row View) Dim id As String = row("Employee ID"). Public Shared Sub Update Employee Wrapper(an ID As String, _ an Address As String, _ a City As String, _ a Postal Code As String) Dim ne As New Northwind Employee(an ID) ne. End Class ' Employee Logic Public Class Northwind Employee Public Sub New(an ID As Object) Me. You can handle the Updated event to examine any return values, output parameters, and exceptions, and to perform any post-processing. Public Shared Function Get All Employees() As ICollection Dim al As New Array List() ' Use the Sql Data Source class to wrap the ' ADO. Dim cts As Connection String Settings = Configuration Manager. Update() If Not retval Then Throw New Northwind Data Exception("Employee update failed.") End If End Sub ' Update Employee ' This method is added as a conveniece wrapper on the original ' implementation. Postal Code = a Postal Code Update Employee(ne) End Sub ' Update Employee Wrapper ' And so on... After the Update operation completes, the On Updated method is called to raise the Updated event.However a link button siting right beside the image button with a command of "Update" just like the image button, did infact proceed to the ODS updating. Form view doesn't seem to support image buttons that fire commands, unless there is some magical setting I am missing.Seems a little strange that the button type would have an impact such as this. I have used image buttons a lot in Grid Views and they work well there. In that case the framework can not locate these fields and the update (and insert) parameters are not filled automatically ...

Leave a Reply