Click here to Skip to main content
15,893,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
Dim objs As New Emis_Business_Layer.Districts

      Dim District As String
      Dim Ownership As String = DropDownList5.SelectedItem.Text
      Dim emiscode As String = txtemiscode.Text


      If District = objs._Get_General_Info_All(DropDownList_District.SelectedItem.Text, DropDownList5.SelectedItem.Text, txtemiscode.Text).Count > Then

          GridView1.DataSource = objs.Get_School_Info(DropDownList_District.SelectedItem.Text)
          GridView1.DataBind()

          Exit Sub

      End If

      If objs._Get_General_Info(DropDownList_District.SelectedItem.Text, Ownership).Count > 0 Then
          GridView1.DataSource = objs.Get_School_Info(DropDownList_District.SelectedItem.Text)
          GridView1.DataBind()
          Exit Sub

      End If

      If objs.Get_School_Emiscode(emiscode).Count > 0 Then

          GridView1.DataSource = objs.Get_School_Info(DropDownList_District.SelectedItem.Text)
          GridView1.DataBind()
          Exit Sub
      Else
          lblerror.Text = "Information those not match"

      End If
Posted
Comments
Sergey Alexandrovich Kryukov 5-Sep-11 13:54pm    
What is your question? Your problem?
--SA
zamani2 5-Sep-11 14:13pm    
oh! my problem is that the if statement gives me an error when i run it.If you see line5 of code(if statement) it not correct.. so I want it to return something and put it in a gridView.. I hope you will help me
Prerak Patel 6-Sep-11 0:10am    
'An error' is too less to say. Can you tell us what exact error it gives?
Al Moje 5-Sep-11 21:38pm    
Could you see us your client code? rather the grid columns so that we could analyst what is your problem?
zamani2 6-Sep-11 6:40am    
@ Al which client code you talking about?
Because the code I gave,it on a presentation(Client code I think)

1 solution

I can see a missing value (> 0) in your code. It won't even compile. It could be a typo. Just check it.
SQL
If District = objs._Get_General_Info_All(DropDownList_District.SelectedItem.Text, DropDownList5.SelectedItem.Text, txtemiscode.Text).Count > 0 Then
 
Share this answer
 
v2
Comments
zamani2 6-Sep-11 6:42am    
tanx for that but still has a problem

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900