I'm traslating this code from VB To C#
But when I translate it I'm getting this error
Execution timeout timed out. The time-out period elapsed before the completion of the operation or the server is not responding.
at this line
DataView o_Selecte_UserData = ((DataView)(ds_Student_Login.Select(DataSourceSelectArguments.Empty)));
Try
ds_Student_Login.SelectParameters("Username").DefaultValue = txt_Username.Text.Trim.ToLower
ds_Student_Login.SelectParameters("Pwd").DefaultValue = getMd5Hash(v_PwdSalt)
ds_Student_Login.DataBind()
Dim o_Selecte_UserData As DataView = CType(ds_Student_Login.Select(DataSourceSelectArguments.Empty), DataView)
For Each o_UserData As DataRow In o_Selecte_UserData.Table.Rows
If o_UserData("Result_Cd") = "OK" Then
Dim v_CkLastLogin As New HttpCookie("PI_LastLogin")
v_CkLastLogin.Values("Username") = txt_Username.Text.ToString.Trim.ToLower
v_CkLastLogin.Expires = DateTime.Now.AddDays(30)
Response.Cookies.Add(v_CkLastLogin)
Session("s_UserID") = o_UserData("User_ID")
Session("s_Username") = o_UserData("Username")
Session("s_Type") = o_UserData("Type")
Session("s_Rol") = o_UserData("Rol")
Session("s_UserFullNm") = o_UserData("UserFullNm")
Session("s_UserImgProfile") = o_UserData("UserImgProfile")
Response.Redirect("Home.aspx", True)
End If
Next
Catch ex As Exception
lbl_AlertDanger.Visible = True
lbl_AlertDanger.Text = "<strong>ERROR</strong> - " + ex.Message
End Try