Jump to content

user define filtering data base


zeeshansmughal
 Share

Recommended Posts

its nice but not give the complete solution, becouse i join the ms access file with two listboxs and using on change event an other command which is "select coloum_name from table_name where field_name =" & listbox.selectedIndexbut gives an error of missing '.' operator.
Link to comment
Share on other sites

"listbox.selectedIndex.value" gives the value that was selectedtry this select coloum_name from table_name where field_name =" & listbox.selectedIndex.value

"listbox.selectedIndex.value" gives the value that was selected : incorrect,not exist"listbox.selecteditem.value"i used listbox.selectedValue it gives the following error:Syntax error (missing operator) in query expression 'field_name = first_value'. note: . operator at the end, it is expecting . between string and the valueit gives only first value from the listbox1, either i select the other valueit gives indication at execute command
Link to comment
Share on other sites

I guess the problem is with postback... do this <asp:ListBox Runat="server" ID="listbox" AutoPostBack=True>then try this, [seems to be working fine to me]Dim sql As String = "select column_name from table_name where field_name = " & listbox.SelectedValue

Link to comment
Share on other sites

I guess the problem is with postback... do this <asp:ListBox Runat="server" ID="listbox" AutoPostBack=True>then try this, [seems to be working fine to me]Dim sql As String = "select column_name from table_name where field_name = " & listbox.SelectedValue

<asp:DropDownList id="one" style="Z-INDEX: 101; LEFT: 256px; POSITION: absolute; TOP: 72px" runat="server" AutoPostBack="True"></asp:DropDownList>That is copied from the code. With this property it's not working.is there other way, means asp code or java script code
Link to comment
Share on other sites

  • 8 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...