asp.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rama127 chandra
    New Member
    • Nov 2011
    • 1

    #1

    asp.net

    In my webform i have one calendar control(fromdat e) and one textbox which is for entering healthtips... In my table i have 3
    columns (one is: healthtips,from date and todate)..... I am inserting data into the database.... for the first time the todate column
    should be like open(like if users selects today's date then todate column in database should show as open, next time the
    user selects date as 3/12/2011 the previous todate should show as 2/12/2011 in database).... I am getting confusion in doing...
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    I'm confused about what you are trying to do as well.

    ASP.NET runs in a disconnected environment.

    It does a bunch of calculations on the server in order to generate HTML that is sent to the browser to display to the user. Once the HTML has been sent to the browser, everything that the server was using for calculations will be destroyed.

    Therefore, you should not open a connection to a database and leave it open. You'll run out of resources on the server and have some pretty bad things happen.

    It sounds like you need another column in your database to indicate if a record is "being edited" for the case when a "From Date" is supplied but a "To Date" is not supplied.

    Or you could consider grabbing all of the required information (Validated information) and writing to the database only after you have gathered everything

    -Frinny

    Comment

    Working...