hiii
I have two page in my adminitrator folder of my web site manageuser.aspx and userinformation.aspx .Now when i click at manage button at manageuser.aspx page i have to navigate userinformation.aspx page with corresponding user.
i set in the greed view of manageuser.aspx page-
<asp:HyperLinkField HeaderText="manage"
Text="manage" DataNavigateUrlFields="UserName"
DataNavigateUrlFormatString="UserInformation.aspx?user={0}"/>
and the coding of userinformation.aspx page is-
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
' If querystring value is missing, send the user to ManageUsers.aspx
Dim userName As String = Request.QueryString("user")
If String.IsNullOrEmpty(userName) Then
Response.Redirect("ManageUser.aspx")
End If
' Get information about this user
Dim usr As MembershipUser = Membership.GetUser(userName)
If usr Is Nothing Then
Response.Redirect("ManageUser.aspx")
End If
UserNameLabel1.Text = usr.UserName
IsApproved.Checked = usr.IsApproved
If usr.LastLockoutDate.Year < 2000 Then
LastLockoutDateLabel1.Text = String.Empty
Else
LastLockoutDateLabel1.Text = usr.LastLockoutDate.ToShortDateString()
UnlockUserButton.Enabled = usr.IsLockedOut
End If
End If
End Sub
the problem is string userName is always taking null value.