error
-
i am using try catch loop. and i have written " Label5.Text = ex.Source & " " & ex.Message" this in catch. it displays thread was aborted. and every time the try catch loop runs whatever we have written in catch executes everytime. how to solve this prob
Mohinder Singh
-
i am using try catch loop. and i have written " Label5.Text = ex.Source & " " & ex.Message" this in catch. it displays thread was aborted. and every time the try catch loop runs whatever we have written in catch executes everytime. how to solve this prob
Mohinder Singh
can you post the code ?
Thanks and Regards Sandeep If you want something you never had, do something you have never done!
-
can you post the code ?
Thanks and Regards Sandeep If you want something you never had, do something you have never done!
This is the code: Public Sub login_Check() Dim LoginCheckdataset As New DataSet Dim Alogindataset As New DataSet Try Dim D As String = Txtlogin.Text.Trim Dim A() As String Dim Fname As String Dim Lname As String If Txtlogin.Text.Trim.ToUpper = "ADMIN" Then Dim ALogincomm As New SqlCommand("AdminLogin", LSCon.Siteconnection) ALogincomm.CommandType = CommandType.StoredProcedure ALogincomm.Parameters.Add("@login", Txtlogin.Text.Trim) ALogincomm.Parameters.Add("@pass", TxtPass.Value) Dim Aloginada As New SqlDataAdapter(ALogincomm) Aloginada.Fill(Alogindataset) If Alogindataset.Tables(0).Rows.Count <> 0 Then Name = Txtlogin.Text.Trim Response.Redirect("Pending Users.aspx") Else Label5.Visible = True Label5.Text = "Password Entered is not correct or Login is not correct." End If Else Dim Month As String Dim Day As Integer Dim Year As Integer Dim Date1 As String Day = Now.Day Month = Now.Month Year = Now.Year If Month > 9 Then Date1 = Day & "/" & Month & "/" & Year Else For i As Integer = 1 To 9 If Month = i Then Month = "0" & i Date1 = Day & "/" & Month & "/" & Year End If Next End If Dim EXP As Date Dim LoginCheckComm As New SqlCommand("Login_Authorization", LSCon.Siteconnection) LoginCheckComm.CommandType = CommandType.StoredProcedure LoginCheckComm.Parameters.Add("@LoginID", Txtlogin.Text.Trim) LoginCheckComm.Parameters.Add("@Pass", TxtPass.Value) Dim LoginCheckAda As New SqlDataAdapter(LoginCheckComm) LoginCheckAda.Fill(LoginCheckdataset) If LoginCheckdataset.Tables(0).Rows.Count <> 0 Then EXP = LoginCheckdataset.Tables(0).Rows.Item(0).Item("ExpDate") If EXP.Date < Date1 Then Label5.Visible = True Label5.Text = "Your Login Has Expired." Exit Sub Else UserType = LoginCheckdataset.Tabl
-
i am using try catch loop. and i have written " Label5.Text = ex.Source & " " & ex.Message" this in catch. it displays thread was aborted. and every time the try catch loop runs whatever we have written in catch executes everytime. how to solve this prob
Mohinder Singh
vengaqua wrote:
t displays thread was aborted.
Are you giving response.end anywhere in the loop ?
string Cheers = "Navaneeth!!" www.w3hearts.com
-
This is the code: Public Sub login_Check() Dim LoginCheckdataset As New DataSet Dim Alogindataset As New DataSet Try Dim D As String = Txtlogin.Text.Trim Dim A() As String Dim Fname As String Dim Lname As String If Txtlogin.Text.Trim.ToUpper = "ADMIN" Then Dim ALogincomm As New SqlCommand("AdminLogin", LSCon.Siteconnection) ALogincomm.CommandType = CommandType.StoredProcedure ALogincomm.Parameters.Add("@login", Txtlogin.Text.Trim) ALogincomm.Parameters.Add("@pass", TxtPass.Value) Dim Aloginada As New SqlDataAdapter(ALogincomm) Aloginada.Fill(Alogindataset) If Alogindataset.Tables(0).Rows.Count <> 0 Then Name = Txtlogin.Text.Trim Response.Redirect("Pending Users.aspx") Else Label5.Visible = True Label5.Text = "Password Entered is not correct or Login is not correct." End If Else Dim Month As String Dim Day As Integer Dim Year As Integer Dim Date1 As String Day = Now.Day Month = Now.Month Year = Now.Year If Month > 9 Then Date1 = Day & "/" & Month & "/" & Year Else For i As Integer = 1 To 9 If Month = i Then Month = "0" & i Date1 = Day & "/" & Month & "/" & Year End If Next End If Dim EXP As Date Dim LoginCheckComm As New SqlCommand("Login_Authorization", LSCon.Siteconnection) LoginCheckComm.CommandType = CommandType.StoredProcedure LoginCheckComm.Parameters.Add("@LoginID", Txtlogin.Text.Trim) LoginCheckComm.Parameters.Add("@Pass", TxtPass.Value) Dim LoginCheckAda As New SqlDataAdapter(LoginCheckComm) LoginCheckAda.Fill(LoginCheckdataset) If LoginCheckdataset.Tables(0).Rows.Count <> 0 Then EXP = LoginCheckdataset.Tables(0).Rows.Item(0).Item("ExpDate") If EXP.Date < Date1 Then Label5.Visible = True Label5.Text = "Your Login Has Expired." Exit Sub Else UserType = LoginCheckdataset.Tabl
-
vengaqua wrote:
t displays thread was aborted.
Are you giving response.end anywhere in the loop ?
string Cheers = "Navaneeth!!" www.w3hearts.com
-
i am using try catch loop. and i have written " Label5.Text = ex.Source & " " & ex.Message" this in catch. it displays thread was aborted. and every time the try catch loop runs whatever we have written in catch executes everytime. how to solve this prob
Mohinder Singh
-
Response.Redirect("Logindms.aspx",false); pass the value false as the second parameter of the Response.Redirect method
dharmender
gvishu wrote:
Response.Redirect("Logindms.aspx",false);
What do mean by false ?
string Cheers = "Navaneeth!!" www.w3hearts.com
-
gvishu wrote:
Response.Redirect("Logindms.aspx",false);
What do mean by false ?
string Cheers = "Navaneeth!!" www.w3hearts.com
-
Response.Redirect("Logindms.aspx",false); pass the value false as the second parameter of the Response.Redirect method
dharmender