During the ASP.NET programming process, the question you have to face is that in the end, many JavaScript code have to be used, especially when opening a new "Mode" window.
In my project, I need to seek a way: transfer the value of TextBox in a Modal window to its parent form. It is easy to implement a value from ASP.NET to JavaScript, but it is not so simple from JavaScript to ASP.NET. You can use the following method to solve this problem.
Because ASP.NET does not support MODAL windows, we will have to use JavaScript to implement. So we add ATTRIBUTE to a Button in the parent form.
Me.Button1.attributes.add ("onclick", "UpdateQuantityDialogopen ();")
UpdateQuantityDialogopen is a JavaScript method to open a MODAL window and return a value.