Return the return value of the mode dialog to the server

zhaozj2021-02-16  77

In some applications, you want to return the value of the mode dialog to the server, which is to perform a server operation, which is refreshed. For example: Compare to the new order, I hope to select the product in the Mode dialog box and return the ID of the product. At the same time, the product item in the order is refreshed. The solution is available, and there are many ways. Here only describes the execution server operation. Methods. To perform the client data backback to the server and perform the appropriate operation, you will clearly have to submit the Form and set the value of the hidden domain _EventTarget. It is better to complete these for us, as long as the appropriate parameter call __dopostback Yes. Another problem is how to pass the value of the Mode dialog over the server, this is said, there are many ways to save the value in a hidden domain, of course, this hidden domain must add Runat = "Server" attribute. . The following is given below: Main page TestDialog.aspx:



Dialog Return Value:

Homepage Back File TestDiallg.aspx.cs:

Private Void Page_Load (Object Sender, Eventargs E) {

Stringbuilder SB = New StringBuilder ();

IF (! IsclientScriptblockRegistered ("Clientscript")) {

Sb.append ("