When I click the button, I call the JavaScript function. After getting the value, I need to do some things from the value obtained in the code. How do I call the code?
My aspx:
function openWindow(page) {
var getval = window.showModalDialog(page);
document.getElementById("<%= TxtInput.ClientID %>").value = getval;
}
The function call button is configured as follows:
<button class="doActionButton" id="btnSelectImage" runat="server" onclick="openWindow('../rcwksheet/popups/uploader.htm')">Select Image</button>
My desired code (VB):
Public Sub btnSaveImage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSelectImage.ServerClick
Dim inputFile As String = Me.TxtInput.Value
End Sub
So:
- Is there a way to call the code from JavaScript?
- Is there any way to use the onclick property of a button to go to JavaScript first and then to the code?
- Run "onchange" code call from TxtInput.Value?
source
share