|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
How to specify that database records have been deleted?
I have a web application that simply has 2 text boxes with a start and end date. I have a submit button which triggers the delete from an access database. I use vb.net and asp.net with an access database.
I either don't display "record deleted" or always display "record deleted". I tried the textboxchanged, but that doesn't trigger until I hit the submit button. I tried response.redirect, response.write and even tried using a label with the message. Can anyone tell me how to stop the "recode deleted" upon clicking on the textbox or clicking anywhere on the form. Thanks |
|
#2
|
|||
|
|||
|
This is a little confusing
How are you writing the "record deleted" to the screen? User selects either show deleted or not, and then after they select show deleted it continues to show deleted after they go back to do not show? Please clarify or just show some code, this doesn't exactly sound like sensitive information so i wouldn't obscure the problem...... |
|
#3
|
|||
|
|||
|
All the user does is enter 2 dates and clicks the submit button. All the database records in that date range are deleted. I first used the response.write statement. But the problem is that the message I display stays on the form because I have no other button to stop it from displaying. I want the message to be gone once the first date is entered again.
Here's the code: ____________________________________________ Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here SetFocus("Txtstartdate") end sub ___________________________________________ Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click 'Response.Write("In button1") With cmddelete .Parameters(0).Value = Txtstartdate.Text.ToString .Parameters(1).Value = txtenddate.Text.ToString End With OleDbConnection1.Open() cmddelete.ExecuteNonQuery() OleDbConnection1.Close() Response.Write("Record(s) deleted") end sub |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > How to specify that database records have been deleted? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|