小编Joe*_*Joe的帖子

显示弹出窗口时防止背景滚动

我有一个弹出窗口中显示的表单.加载后,背景显示为灰色,但用户仍可以上下滚动背景内容.

如何防止背景滚动?

这里的例子

pdf屏幕截图右侧的'发送此报价'链接.

html jquery popup

21
推荐指数
2
解决办法
5万
查看次数

如何使非常简单的ASP.Net密码保护页面

我正在寻找一个非常简单的密码保护ASP.Net页面的解决方案.

我找到了我在这里寻找的东西,但它在ASP中,我不知道将其转换为ASP.Net的语法.

它只是创建一个临时cookie,一旦关闭浏览器窗口就会过期.

我不打算将用户名/密码存储在数据库中.我偶尔会手动更改密码.

只需帮我将以下代码转换为ASP.Net就太棒了!

这将在logon.aspx页面上进行,并从表单中提取值.

Username="Administrator"
Password="Admin"
Validated = "OK"

if Strcomp(Request.Form("User"),Username,1)=0 AND Request.Form("password") = Password then
    Response.Cookies("ValidUser") = Validated

    If (Request.QueryString("from")<>"") then
        Response.Redirect Request.QueryString("from")
    else
      Response.Redirect "MyPage.aspx"
    End if    
Else
    If Request.Form("User") <> "" then
        Response.Write "<h3>Authorization Failed.</h3>" & "<br>" & _ "Please try again.<br>&#xa0;<br>"
    End if
End if
Run Code Online (Sandbox Code Playgroud)

这在密码保护页面上进行,以确认cookie已创建.

Validated = "OK"

if Request.Cookies("ValidUser") <> Validated then
dim s
s = "http://"
s = s & Request.ServerVariables("HTTP_HOST")
s = s & Request.ServerVariables("URL")

if …
Run Code Online (Sandbox Code Playgroud)

asp.net authentication

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

asp.net ×1

authentication ×1

html ×1

jquery ×1

popup ×1