1
Answer

Loosing the values of dynamically created textboxes

Maher

Maher

19y
1.8k
1
Depending on an SQL result, I create a list of TextBoxes using PlaceHolder as the container. I also added abutton to save the user input. The problem is when I click on the button to read the user input the postback remove all my controls before I have the chance to read the user input. Do you know how I can read the user input before they are removed. Thank you in dvance
Answers (1)
1
Madhanmohan Devarajan

Madhanmohan Devarajan

NA 6.5k 471.5k 8y
Gaurav,
Would like to understand few things.
Whether you want to delete the records in a table based on the count of rows (parameter)? irrespective of which 10 or 40 records to be deleted.
Below link has the sample stored procedure to delete the records (result of search query) from the table.
https://technet.microsoft.com/en-us/library/ms189634(v=sql.105).aspx
Hope it will solve your issue.
Accepted
0
Nigel Fernandes

Nigel Fernandes

NA 4k 138.9k 8y
Another approach you can take is schedule the deletion of rows during a time when database is not used.
Example during Night.
Then you would not need to implement any extra logic.
But use this, only if deletion can be done later.
0
Nepethya Rana

Nepethya Rana

NA 335 20.1k 8y
CREATE PROCEDURE spDeleteRecord
@DeleteBatchSize INT,
@DelayTime DATETIME
AS
BEGIN
SET NOCOUNT ON;
DECLARE @DeleteRowCount INT
SET @DeleteRowCount = 1

WHILE (@DeleteRowCount > 0)
BEGIN
BEGIN TRANSACTION
DELETE TOP(@DeleteBatchSize) SchemaTableName;
SET @DeleteRowCount = @@ROWCOUNT;
PRINT @DeleteRowCount;
COMMIT
WAITFOR DELAY @DelayTime
END
END
GO
0
Dhananjay Kumar

Dhananjay Kumar

NA 1.1k 8.7k 8y
https://sqlperformance.com/2013/03/io-subsystem/chunk-deletes