Request State Example
This example first sets an state variable myvariable with the value myvalue using request.state.set(). Then using an se:if to test if the myvariable exists, it displays the value using request.state.get().
The request.state vipers are using the HttpContext.Items collection to store/retrieve information. When you're also using native ASP.NET pages within your site, you can thus use the HttpContext.Items collection and the request.state vipers to pass on/share information between sxml and ASP.NET pages.
| Smartsite SXML |
|
|---|---|
{request.state.set(myvariable,myvalue)}
<se:if expression="request.state.exists(myvariable)">
{request.state.get(myvariable)}
</se:if>
|
|
| Example Result |
|
|---|---|
myvalue |
|