B
bienwell
Hi all,
I still have a problem when using Confirmation box in ASP.NET program. I
need to get the value return of YES or NO from confirmation box in Sub
function of VB program to do some tasks. For example, I have 2 text boxes
and one button. The button will call On_Click event .
Sub btnSelect_OnClick(ByVal sender As Object, ByVal e As EventArgs)
Dim X as double = CDBL(txtbox1.text)
Dim Y as double = CDBL(txtbox2.text)
If X > Y Then
display confirmation box ("Add $50 to X ? ")
If answer = YES Then X=X+50
Else Do Nothing
End If
Else
display confirmation box ("Subtract $50 to X ? ")
If answer = YES Then X=X-50
Else Do Nothing
End If
End If
End Sub
Can we get the return value of YES / NO from confirmation box with this
pseudocode ? As I know the confirmation will work when you have an event
before clicking the button (e.g in Page_Load
Me.Button1.Attributes.Add("OnClick","return confirm('Are you sure you add
$50 to the X ?');") ) . With this the message is not dynamic.
Can you provide a source code for this ?
Thanks in advance.
I still have a problem when using Confirmation box in ASP.NET program. I
need to get the value return of YES or NO from confirmation box in Sub
function of VB program to do some tasks. For example, I have 2 text boxes
and one button. The button will call On_Click event .
Sub btnSelect_OnClick(ByVal sender As Object, ByVal e As EventArgs)
Dim X as double = CDBL(txtbox1.text)
Dim Y as double = CDBL(txtbox2.text)
If X > Y Then
display confirmation box ("Add $50 to X ? ")
If answer = YES Then X=X+50
Else Do Nothing
End If
Else
display confirmation box ("Subtract $50 to X ? ")
If answer = YES Then X=X-50
Else Do Nothing
End If
End If
End Sub
Can we get the return value of YES / NO from confirmation box with this
pseudocode ? As I know the confirmation will work when you have an event
before clicking the button (e.g in Page_Load
Me.Button1.Attributes.Add("OnClick","return confirm('Are you sure you add
$50 to the X ?');") ) . With this the message is not dynamic.
Can you provide a source code for this ?
Thanks in advance.