locked
hot to selected a checked box RRS feed

  • Question

  • hi Every one i want to selected multiple checked box and i want to save these checked box in a single field..

    means i wand to select three months in at a time and i want to save it a single field ...........

    i am a beginner and i don,t have any idea in asp.net so plz any body help me

    • Moved by Jason Dot Wang Wednesday, March 13, 2013 8:30 AM This thread is about ASP.NET
    Tuesday, March 12, 2013 7:15 AM

Answers

  • if you are about to save those data in a database it's better to use a separated table. but if you insist on saving them all in a single field of a table you can create a string contained of all your data (months in your scenario) and separate them with a specific character like ',' or '|' or anything else. then when you want to extract the data you can use split() function with returns an array of strings ...



    Please mark the post as an answer that helps/solves your problem.

    • Proposed as answer by Ahmed.Ismail Tuesday, March 12, 2013 12:14 PM
    • Marked as answer by Just Karl Friday, November 1, 2013 5:49 PM
    Tuesday, March 12, 2013 7:45 AM
  • Hi Nizam Ullah,

      Welcome to MSDN Forum Support.

     

      You are more likely to get more efficient responses to ASP.NET issues at http://forums.asp.net where you can contact ASP.NET experts.

      Sincerely,

      Jason Wang



    Jason Wang [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Just Karl Friday, November 1, 2013 5:49 PM
    Wednesday, March 13, 2013 8:29 AM

All replies

  • if you are about to save those data in a database it's better to use a separated table. but if you insist on saving them all in a single field of a table you can create a string contained of all your data (months in your scenario) and separate them with a specific character like ',' or '|' or anything else. then when you want to extract the data you can use split() function with returns an array of strings ...



    Please mark the post as an answer that helps/solves your problem.

    • Proposed as answer by Ahmed.Ismail Tuesday, March 12, 2013 12:14 PM
    • Marked as answer by Just Karl Friday, November 1, 2013 5:49 PM
    Tuesday, March 12, 2013 7:45 AM
  • Asp questions will be better answewed in the ASP forum.

     

    Noam B.



    Do not Forget to Vote as Answer/Helpful, please. It encourages us to help you...

    Tuesday, March 12, 2013 12:06 PM
  • Hi Nizam Ullah,

      Welcome to MSDN Forum Support.

     

      You are more likely to get more efficient responses to ASP.NET issues at http://forums.asp.net where you can contact ASP.NET experts.

      Sincerely,

      Jason Wang



    Jason Wang [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Just Karl Friday, November 1, 2013 5:49 PM
    Wednesday, March 13, 2013 8:29 AM