Net onrowupdating

If you don't need to get data from the user, than yes you can do the Data Bind in the Page Load event.

But if you need to get data from the user for updating purposes then, no, you should do it in the Page Pre Render event instead.

I like to be in more control of my database connections. You could do this in your Page Load event if you want to.

You could cache the object that you are going to use as a data source too.

Anyways, once you've populated your data source (or retrieved it from cache) you set the Grid View.

Data Source property to the object you are the Grid View.

' Where you can not call a function in order for the Edit to work in a Grid View with the Sql Data Source.

So I used a IF, ELSE in the Stored Procedure to return what Display State was returning. The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.I dont think its the SQL command, its something in the . I wondering if its executing the Command before I set those Default Values to the Sql Data Source.aany trying the debug method int he mean time.If I want to access the method in which we define update query, how can I access that method on aspx page & update the data in a grid view without direct use of an query on aspx page under sql data source?What you would have to do is implement a method that handles the Grid View. In this method you will have to retrieve the data from the row that is updating and use this data to update your database. My stored Procedure is ALTER PROCEDURE [dbo].[sp_Update Checks] @ID int, @DID int, @Cashiers Check bit, @Payable To varchar(MAX), @Amount money, @Purpose varchar(MAX), @Has Address bit, @Address varchar(150), @City varchar(150), @State int, @Zip varchar(50) AS BEGIN SET NOCOUNT ON; UPDATE Checks SET Cashiers Check = @Cashiers Check, Payable To = @Payable To, Amount = @Amount, Purpose = @Purpose WHERE ID = @ID AND DID = @DID; DELETE FROM Checks Address WHERE ID = @ID; IF @Has Address = 'True' INSERT INTO Checks Address(Address, City, State, Zip, ID) VALUES(@Address, @City, @State, @Zip, @ID); END Has address is a bit but you're comparing it as a Var Char: IF @Has Address = 'True' Try IF @Has Address = 'Y' Essentially the insert Address line is being called everytime.

Tags: , ,