QAdminBasePageModelCreateAutoRedirectContent Method
Namespace: QuickAdmin.RCLAssembly: QuickAdmin.Net (in QuickAdmin.Net.dll) Version: 1.0.122
public ContentResult CreateAutoRedirectContent(
string url,
string title = null,
int delaySeconds = 3,
string bodyContent = null,
bool isBodyContentHtml = false
)
- url string
- 要跳转到的 url。
- title string (Optional)
- 页面标题。
- delaySeconds int (Optional)
- 延迟秒数。
- bodyContent string (Optional)
- 页面内容。
- isBodyContentHtml bool (Optional)
-
指示 bodyContent 是 HTML 格式文本还是纯文本。
若传入 true,bodyContent 将被原样输出。
若传入 false,bodyContent 将被 HTML 编码并包裹到一个 div 中。
ContentResult一个
ContentResult 响应结果,其内容 MIME 类型为 "
text/html"。
自动跳转是通过 meta 标签:<meta http-equiv="refresh" content="{delaySeconds};url={url}" /> 实现的。
通常在响应 GET 请求时按需调用。