Hello sir/mam i want to help from you.i am working in asp.net c# and sql server
Suppose I have 3 columns in database and i want to insert multiple row in database on click
If i have 5 textbox mean 5 row will be insert.Please help i will wait your answer

Pankaj Kumar ChoudharyRank #80 · 24.4K reputationPosted Sep 4, 2015, 4:23 PM EDT
Monu Zira69 reputationPosted Sep 4, 2015, 8:48 PM EDT
Munesh SharmaRank #174 · 13.9K reputationPosted Sep 4, 2015, 9:29 PM EDT
Pankaj Kumar ChoudharyRank #80 · 24.4K reputationPosted Sep 4, 2015, 9:52 PM EDT
AS
BEGIN
DECLARE @StartIndex INT, @EndIndex INT
SET @StartIndex = 1
IF SUBSTRING(@String, LEN(@String) - 1, LEN(@String)) <>','
BEGIN
SET @String = @String + ','
END
WHILE CHARINDEX(',', @String) > 0
BEGIN
SET @EndIndex = CHARINDEX(',', @String)
INSERT INTO TabExam(Col)
SELECT SUBSTRING(@String, @StartIndex, @EndIndex - 1)
SET @String = SUBSTRING(@String, @EndIndex + 1, LEN(@String))
END
END
Monu Zira69 reputationPosted Sep 4, 2015, 10:26 PM EDT
Munesh SharmaRank #174 · 13.9K reputationPosted Sep 4, 2015, 10:31 PM EDT