Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. error

error

Scheduled Pinned Locked Moved ASP.NET
11 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vengaqua
    wrote on last edited by
    #1

    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

    G S N 4 Replies Last reply
    0
    • V vengaqua

      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

      G Offline
      G Offline
      gvishu
      wrote on last edited by
      #2

      Try only this --> Label5.Text = ex.Message

      dharmender

      1 Reply Last reply
      0
      • V vengaqua

        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

        S Offline
        S Offline
        Sandeep Akhare
        wrote on last edited by
        #3

        can you post the code ?

        Thanks and Regards Sandeep If you want something you never had, do something you have never done!

        V 1 Reply Last reply
        0
        • S Sandeep Akhare

          can you post the code ?

          Thanks and Regards Sandeep If you want something you never had, do something you have never done!

          V Offline
          V Offline
          vengaqua
          wrote on last edited by
          #4

          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

          N 1 Reply Last reply
          0
          • V vengaqua

            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

            N Offline
            N Offline
            N a v a n e e t h
            wrote on last edited by
            #5

            vengaqua wrote:

            t displays thread was aborted.

            Are you giving response.end anywhere in the loop ?


            string Cheers = "Navaneeth!!" www.w3hearts.com

            G 1 Reply Last reply
            0
            • V vengaqua

              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

              N Offline
              N Offline
              N a v a n e e t h
              wrote on last edited by
              #6

              In this where u r using loop ?


              string Cheers = "Navaneeth!!" www.w3hearts.com

              1 Reply Last reply
              0
              • N N a v a n e e t h

                vengaqua wrote:

                t displays thread was aborted.

                Are you giving response.end anywhere in the loop ?


                string Cheers = "Navaneeth!!" www.w3hearts.com

                G Offline
                G Offline
                gvishu
                wrote on last edited by
                #7

                Find some valuable informatin at this link. http://p2p.wrox.com/topic.asp?TOPIC_ID=5989[^]

                dharmender

                1 Reply Last reply
                0
                • V vengaqua

                  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

                  G Offline
                  G Offline
                  gvishu
                  wrote on last edited by
                  #8

                  Response.Redirect("Logindms.aspx",false); pass the value false as the second parameter of the Response.Redirect method

                  dharmender

                  N V 2 Replies Last reply
                  0
                  • G gvishu

                    Response.Redirect("Logindms.aspx",false); pass the value false as the second parameter of the Response.Redirect method

                    dharmender

                    N Offline
                    N Offline
                    N a v a n e e t h
                    wrote on last edited by
                    #9

                    gvishu wrote:

                    Response.Redirect("Logindms.aspx",false);

                    What do mean by false ?


                    string Cheers = "Navaneeth!!" www.w3hearts.com

                    G 1 Reply Last reply
                    0
                    • N N a v a n e e t h

                      gvishu wrote:

                      Response.Redirect("Logindms.aspx",false);

                      What do mean by false ?


                      string Cheers = "Navaneeth!!" www.w3hearts.com

                      G Offline
                      G Offline
                      gvishu
                      wrote on last edited by
                      #10

                      Just Check out at the following link. http://p2p.wrox.com/topic.asp?TOPIC_ID=5989[^][^]

                      dharmender

                      1 Reply Last reply
                      0
                      • G gvishu

                        Response.Redirect("Logindms.aspx",false); pass the value false as the second parameter of the Response.Redirect method

                        dharmender

                        V Offline
                        V Offline
                        vengaqua
                        wrote on last edited by
                        #11

                        thanks dear not it is not going in the catch loop

                        Mohinder Singh

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups