imp
-
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
-
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
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. ;)
-
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
-
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
-
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
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.
-
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?
-
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.
-
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.
-
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
-
but here always seen flag==0 if i will select date that time also flag==0 how? gayatri Gayatri