Skip to content

Commit b271507

Browse files
Update README.md
1 parent ca2d027 commit b271507

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ In the example above, the `My text string` is placed inside the third `li` tag w
201201

202202
WebFormsJS has a different approach to responding to the first page request in the browser and AJAX requests when the page is already loaded and the user makes a request.
203203

204-
In the first case, if an action is added for the controls, a script is added at the bottom of the page and the actions are placed in the `cb_SetWebFormsValues` ​​method.
204+
In the first case, if an action is added for the controls, a tag named `web-forms` is added at the bottom of the page, and the actions are placed in the `ac` attribute of the web-forms tag.
205205

206206
Example:
207207

@@ -216,7 +216,7 @@ Example:
216216
<input name="TextBox" id="TextBox" type="text" />
217217
...
218218
</body>
219-
</html><script>cb_SetWebFormsValues(`[web-forms]$[sln];asTextBox=color:red`);</script>
219+
</html><web-forms ac="bc<body>=green"></web-forms>
220220
```
221221

222222
In the second case, after the user's request, if the current View is changed, the server must place the Set Text code for the main tag (usually `body`) at the beginning of the action code.
@@ -226,9 +226,11 @@ Example:
226226
```ini
227227
[web-forms]
228228
st<body>=...$[ln]; <input name="TextBox" id="TextBox" type="text" />$[ln];...
229-
as<body>=background-color:green
229+
bc<body>=green
230230
```
231231

232+
> Note: When a request is made with WebFormJS, a header with the name `Post-Back` and the value `true` is also sent to the server. Therefore, it is easy to determine the response approach on the server.
233+
232234
## PostBack and GetBack method
233235

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

0 commit comments

Comments
 (0)