Sometimes we need to display a page containing password in edit mode.
So here is the code in .NET for the same.
txtPassword.Attributes("value") = dsMember.Tables(0).Rows(0).Item("Password")
or simply txtPassword.Attributes("value") = "your password"
Friday, June 23, 2006
Friday, June 16, 2006
Redirect to login and redirection to same page using querystring
In Login.aspx.vb Login button click event
If Not Request.QueryString("Ref") = Nothing Then
Response.Redirect(Request.QueryString("Ref"), False)
Else
Response.Redirect("default.aspx", False)
End If
In all other pages' load event
If Session("UserID") Is Nothing Then
'Response.Redirect("Login.aspx", False)
Response.Redirect("Login.aspx?Ref=" & HttpContext.Current.Request.Url.PathAndQuery.ToString(), False)
Else
.
.
.
.
.
End if
If Not Request.QueryString("Ref") = Nothing Then
Response.Redirect(Request.QueryString("Ref"), False)
Else
Response.Redirect("default.aspx", False)
End If
In all other pages' load event
If Session("UserID") Is Nothing Then
'Response.Redirect("Login.aspx", False)
Response.Redirect("Login.aspx?Ref=" & HttpContext.Current.Request.Url.PathAndQuery.ToString(), False)
Else
.
.
.
.
.
End if
Subscribe to:
Posts (Atom)