Skip to content

Commit c5f0d6b

Browse files
Update README.md
1 parent 280cd71 commit c5f0d6b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ PostBackOptions.SetResponseInsideDivTag = true;
3939
PostBackOptions.ProgressBarStyle = "width:100%;min-width:300px;max-width:600px;background-color:#eee;margin:2px 0px";
4040
PostBackOptions.ProgressBarPercentLoadedStyle = "position:absolute;padding:0px 4px;line-height:22px";
4141
PostBackOptions.ProgressBarValueStyle = "height:20px;background-color:#4D93DD;width:0%";
42+
PostBackOptions.AddLogForWebSockets = true;
4243
```
4344
WebFormsJS options:
4445

@@ -52,6 +53,7 @@ WebFormsJS options:
5253
- ProgressBarStyle: Styles for progress bar
5354
- ProgressBarPercentLoadedStyle: Styles for percentage and text size for progress bar
5455
- ProgressBarValueStyle: Styles for uploading animation for progress bar
56+
- AddLogForWebSockets: Enabling this option will log connections, disconnections, and data sent between the server and client in WebSocket protocol.
5557

5658
## Action Controls
5759

@@ -440,6 +442,22 @@ tc<form>|<p>=yellow
440442

441443
> Note: Multiple-Responses are mostly used for offline cases and it is recommended to enable HTML headers for long-term client-side caching for multiple responses.
442444
445+
## Uisng WebSocket
446+
447+
WebForms Core technology also supports the WebSocket protocol.
448+
449+
Sending data in WebSocket mode is also possible with form submission. In order to send data under the WebSocket protocol, you must either enable the use of WebForms class methods on the server. Of course, you can also send under the WebSocket protocol by adding the `usewebsocket` attribute to the form tag.
450+
451+
Example:
452+
```html
453+
<form action="/mypage" method="post" usewebsocket>
454+
Text
455+
<br>
456+
<textarea name="Textarea1"></textarea><br><br>
457+
<input type="submit" name="Button1" value="Send">
458+
</form>
459+
```
460+
443461
## PostBack and GetBack and TagBack method
444462

445463
`PostBack` and `GetBack` are two methods in WebFormsJS.

0 commit comments

Comments
 (0)