locked
Need Help with posting from aspx page to an access database RRS feed

  • Question

  • User24519973 posted

    I have an aspx (using javascript) form where providers will select a main category, then select a sub category (both from drop down lists).  Then they will enter data into a cost field (text box).  The sub category and the cost field are in a table.   They can choose up to 30 sub category fields (one per row) and enter different costs in the cost field for each.   There is additional data outside of this table that they will also complete but that info is just text boxes.  After all items are complete they hit the submit button. 

    Upon hitting the submit button I need only the cost data and the other text boxes below to be populated into an access database for each of the sub category items they selected.  I don't really want to write the sub category items over just want the inputted data saved.  Is this possible?  Any examples or assistance is appreciated.

     

    Wednesday, July 24, 2013 11:07 AM

Answers

  • User38443587 posted

    hello, from my understand you want to save the text box info which have sub category and don’t want to save sub category info.

    If I’m correct, I’ll suggest you to set text box and sub category the same name plus row number as “cost1,cost2,category1,category2…”,

    Then you can check the sub category info like this demo:

    ArrayList arr = new ArrayList();
                for (int i = 0; i < 30; i++)
                {
                    if (Request["category" + i] != "0")
                    {
                        arr.Add(Request["cost" + i]);   //here you can save the cost info to DB
                    }
                }

    If my understand is not correct please give more info then I can help you more effective.

    Thank you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 25, 2013 3:46 AM