I have table in an sspx pate.
The table has 12 columns - one for each month and one row per product.
The cells have an ID in the aspx page p1_Jan, p2_Jan, p1_Feb, p2_Feb and so on.
In the C# code, i am doing an insert into a backend table.
My sql is as below:
INSERT INTO [Sales_Emp_Quota] ([ID],[Type],
[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12])
VALUES (123456, 'P1',
p1_Jan.text,p1_Feb.text,0,0, 0,0,0,0, 0,0,0,0)
Each aspx page is for a specific product, which is part of session variable.
p1, p2, etc. reflect region / districts.
So if there were 10 regions, I would have 10 rows in the aspx table and 10 rows would be inserted into the back-end table.
Is there a way I can concatenate the name of the variable p1_Jan, p2_Feb, etc. as "p" + i.tostring() + "_Jan"?
Else, I would have to write too many lines of repetiti ...
Go to the complete details ...