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. imp

imp

Scheduled Pinned Locked Moved ASP.NET
10 Posts 6 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.
  • N Offline
    N Offline
    niki_nilu
    wrote on last edited by
    #1

    hello i want three if codition how can run it. in this code if (flag == 0) { funSearchSecurityCode(); } this if condition run. this is also run--- if (drpdwnAnalystName.SelectedItem.Value == strDropdown) { funSearchAnalyst(); } but in this pointer is not go inside directly go outside funStyle(). if (flag==1) { funSearchFromDate(); } funStyle(); code-------- protected void btnSearch_Click1(object sender, EventArgs e) { string strDropdown = drpdwnAnalystName.SelectedItem.Text; string strSecurityCode = txtSecurityCode.Text; string strFromDate = dtpFrom.SelectedDate.ToString(); int flag = 0; if (flag == 0) { funSearchSecurityCode(); } if (drpdwnAnalystName.SelectedItem.Value == strDropdown) { funSearchAnalyst(); } if (flag==1) { funSearchFromDate(); } funStyle(); txtSecurityCode.Text = ""; drpdwnAnalystName.SelectedItem.Text = ""; } Gayatri

    K J P I I 5 Replies Last reply
    0
    • N niki_nilu

      hello i want three if codition how can run it. in this code if (flag == 0) { funSearchSecurityCode(); } this if condition run. this is also run--- if (drpdwnAnalystName.SelectedItem.Value == strDropdown) { funSearchAnalyst(); } but in this pointer is not go inside directly go outside funStyle(). if (flag==1) { funSearchFromDate(); } funStyle(); code-------- protected void btnSearch_Click1(object sender, EventArgs e) { string strDropdown = drpdwnAnalystName.SelectedItem.Text; string strSecurityCode = txtSecurityCode.Text; string strFromDate = dtpFrom.SelectedDate.ToString(); int flag = 0; if (flag == 0) { funSearchSecurityCode(); } if (drpdwnAnalystName.SelectedItem.Value == strDropdown) { funSearchAnalyst(); } if (flag==1) { funSearchFromDate(); } funStyle(); txtSecurityCode.Text = ""; drpdwnAnalystName.SelectedItem.Text = ""; } Gayatri

      K Offline
      K Offline
      kapil bhatnagar
      wrote on last edited by
      #2

      First if condition getting executed implies the value of flag = 0 hence third if condition would be false and hence the inside code will not be executed. ;)

      1 Reply Last reply
      0
      • N niki_nilu

        hello i want three if codition how can run it. in this code if (flag == 0) { funSearchSecurityCode(); } this if condition run. this is also run--- if (drpdwnAnalystName.SelectedItem.Value == strDropdown) { funSearchAnalyst(); } but in this pointer is not go inside directly go outside funStyle(). if (flag==1) { funSearchFromDate(); } funStyle(); code-------- protected void btnSearch_Click1(object sender, EventArgs e) { string strDropdown = drpdwnAnalystName.SelectedItem.Text; string strSecurityCode = txtSecurityCode.Text; string strFromDate = dtpFrom.SelectedDate.ToString(); int flag = 0; if (flag == 0) { funSearchSecurityCode(); } if (drpdwnAnalystName.SelectedItem.Value == strDropdown) { funSearchAnalyst(); } if (flag==1) { funSearchFromDate(); } funStyle(); txtSecurityCode.Text = ""; drpdwnAnalystName.SelectedItem.Text = ""; } Gayatri

        J Offline
        J Offline
        John ph
        wrote on last edited by
        #3

        Why is that subject line missing in your post?

        - Regards -
           JON


        Life is not measured by the amount of breaths we take, but by the moments that take our breath away.


        1 Reply Last reply
        0
        • N niki_nilu

          hello i want three if codition how can run it. in this code if (flag == 0) { funSearchSecurityCode(); } this if condition run. this is also run--- if (drpdwnAnalystName.SelectedItem.Value == strDropdown) { funSearchAnalyst(); } but in this pointer is not go inside directly go outside funStyle(). if (flag==1) { funSearchFromDate(); } funStyle(); code-------- protected void btnSearch_Click1(object sender, EventArgs e) { string strDropdown = drpdwnAnalystName.SelectedItem.Text; string strSecurityCode = txtSecurityCode.Text; string strFromDate = dtpFrom.SelectedDate.ToString(); int flag = 0; if (flag == 0) { funSearchSecurityCode(); } if (drpdwnAnalystName.SelectedItem.Value == strDropdown) { funSearchAnalyst(); } if (flag==1) { funSearchFromDate(); } funStyle(); txtSecurityCode.Text = ""; drpdwnAnalystName.SelectedItem.Text = ""; } Gayatri

          P Offline
          P Offline
          Prateek G
          wrote on last edited by
          #4

          I guess it can go inside only one if condition either if(flag == 0) or if(flag ==1) and since its going inside flag==0 it shows flag value is 0 then it wont go inside other if condition and its working properly. What is ur problem?

          N 1 Reply Last reply
          0
          • N niki_nilu

            hello i want three if codition how can run it. in this code if (flag == 0) { funSearchSecurityCode(); } this if condition run. this is also run--- if (drpdwnAnalystName.SelectedItem.Value == strDropdown) { funSearchAnalyst(); } but in this pointer is not go inside directly go outside funStyle(). if (flag==1) { funSearchFromDate(); } funStyle(); code-------- protected void btnSearch_Click1(object sender, EventArgs e) { string strDropdown = drpdwnAnalystName.SelectedItem.Text; string strSecurityCode = txtSecurityCode.Text; string strFromDate = dtpFrom.SelectedDate.ToString(); int flag = 0; if (flag == 0) { funSearchSecurityCode(); } if (drpdwnAnalystName.SelectedItem.Value == strDropdown) { funSearchAnalyst(); } if (flag==1) { funSearchFromDate(); } funStyle(); txtSecurityCode.Text = ""; drpdwnAnalystName.SelectedItem.Text = ""; } Gayatri

            I Offline
            I Offline
            Imran Khan Pathan
            wrote on last edited by
            #5

            niki_nilu wrote:

            if (flag == 0) { funSearchSecurityCode(); } this if condition run.

            if flag is 0

            niki_nilu wrote:

            if (drpdwnAnalystName.SelectedItem.Value == strDropdown) { funSearchAnalyst(); }

            if drpdwnAnalystName.SelectedItem.Value is equal strDropdown

            niki_nilu wrote:

            but in this pointer is not go inside directly go outside funStyle(). if (flag==1) { funSearchFromDate(); } funStyle();

            Becouse flag is not 1. it is 0 What you want to do? bEst rEGard pAthan

            please don't forget to vote on the post that helped you.

            N 1 Reply Last reply
            0
            • P Prateek G

              I guess it can go inside only one if condition either if(flag == 0) or if(flag ==1) and since its going inside flag==0 it shows flag value is 0 then it wont go inside other if condition and its working properly. What is ur problem?

              N Offline
              N Offline
              niki_nilu
              wrote on last edited by
              #6

              but here always seen flag==0 if i will select date that time also flag==0 how? gayatri Gayatri

              P 1 Reply Last reply
              0
              • I Imran Khan Pathan

                niki_nilu wrote:

                if (flag == 0) { funSearchSecurityCode(); } this if condition run.

                if flag is 0

                niki_nilu wrote:

                if (drpdwnAnalystName.SelectedItem.Value == strDropdown) { funSearchAnalyst(); }

                if drpdwnAnalystName.SelectedItem.Value is equal strDropdown

                niki_nilu wrote:

                but in this pointer is not go inside directly go outside funStyle(). if (flag==1) { funSearchFromDate(); } funStyle();

                Becouse flag is not 1. it is 0 What you want to do? bEst rEGard pAthan

                please don't forget to vote on the post that helped you.

                N Offline
                N Offline
                niki_nilu
                wrote on last edited by
                #7

                when i will select date that time i want to run last if condition. gayatri Gayatri

                I 1 Reply Last reply
                0
                • N niki_nilu

                  when i will select date that time i want to run last if condition. gayatri Gayatri

                  I Offline
                  I Offline
                  Imran Khan Pathan
                  wrote on last edited by
                  #8

                  niki_nilu wrote:

                  when i will select date that time i want to run last if condition.

                  then set flag=1 for example

                  if(txtLastDate.Text!="")
                  {
                  flag=1
                  }
                  else
                  {
                  flag=0
                  }
                  if(flag==0)
                  {
                  //code here
                  }
                  else if(dd.selectedvalue==......)
                  {
                  //code here
                  }
                  else
                  {
                  //code here
                  }

                  } } bEst rEgard

                  please don't forget to vote on the post that helped you.

                  1 Reply Last reply
                  0
                  • N niki_nilu

                    hello i want three if codition how can run it. in this code if (flag == 0) { funSearchSecurityCode(); } this if condition run. this is also run--- if (drpdwnAnalystName.SelectedItem.Value == strDropdown) { funSearchAnalyst(); } but in this pointer is not go inside directly go outside funStyle(). if (flag==1) { funSearchFromDate(); } funStyle(); code-------- protected void btnSearch_Click1(object sender, EventArgs e) { string strDropdown = drpdwnAnalystName.SelectedItem.Text; string strSecurityCode = txtSecurityCode.Text; string strFromDate = dtpFrom.SelectedDate.ToString(); int flag = 0; if (flag == 0) { funSearchSecurityCode(); } if (drpdwnAnalystName.SelectedItem.Value == strDropdown) { funSearchAnalyst(); } if (flag==1) { funSearchFromDate(); } funStyle(); txtSecurityCode.Text = ""; drpdwnAnalystName.SelectedItem.Text = ""; } Gayatri

                    I Offline
                    I Offline
                    InsDev
                    wrote on last edited by
                    #9

                    The above code which u have posted how u think that flag value change with 1. I don't think so it will satisfied the condition flag==1.Think about that. Devjit Das

                    1 Reply Last reply
                    0
                    • N niki_nilu

                      but here always seen flag==0 if i will select date that time also flag==0 how? gayatri Gayatri

                      P Offline
                      P Offline
                      Prateek G
                      wrote on last edited by
                      #10

                      u r setting flag = 0 but where are u setting flag =1 U need to do that manually based on ur condition..

                      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