'FindStringExact' is not a member of 'System.Web.UI.WebControls.ListBox'.

Discussion in 'ASP .Net' started by Richard, Jun 4, 2004.

  1. Richard

    Richard Guest

    Dim index As Integer = lbSysteem.FindStringExact(strSysteem)

    basicly i want to return the value but as the examples show on the MSDN
    library, nothings wrong with the code?
    if FindStringExact isnt a member of Listbox then from what is it?

    thx in advance,

    Richard
     
    Richard, Jun 4, 2004
    #1
    1. Advertising

  2. Richard

    Gary Chang Guest

    Hi Richard

    Currently I am looking for somebody who could help you on it. We will reply
    here with more information as soon as possible.
    If you have any more concerns on it, please feel free to post here.


    Thanks for your understanding!

    Best regards,

    Gary Chang
    Microsoft Online Partner Support

    Get Secure! - www.microsoft.com/security
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------
     
    Gary Chang, Jun 5, 2004
    #2
    1. Advertising

  3. Richard

    Richard Guest

    I found a way around it, by just looping throu the listbox control althrou
    the FindStringExact would make it much easier and less code, my problem is
    solved. It is only used in the "System.Windows.Forms" which isnt in my .NET
    Framework or I ever heared of it. I am just going to find some more info
    about it so I wont have the problem again in the future.

    Thx for your help anyway.

    Richard


    "Gary Chang" <> schreef in bericht
    news:...
    > Hi Richard
    >
    > Currently I am looking for somebody who could help you on it. We will

    reply
    > here with more information as soon as possible.
    > If you have any more concerns on it, please feel free to post here.
    >
    >
    > Thanks for your understanding!
    >
    > Best regards,
    >
    > Gary Chang
    > Microsoft Online Partner Support
    >
    > Get Secure! - www.microsoft.com/security
    > This posting is provided "AS IS" with no warranties, and confers no

    rights.
    > --------------------
    >
     
    Richard, Jun 5, 2004
    #3
  4. "Richard" <> wrote in message
    news:40c0f76b$0$9292$...
    > Dim index As Integer = lbSysteem.FindStringExact(strSysteem)
    >
    > basicly i want to return the value but as the examples show on the MSDN
    > library, nothings wrong with the code?
    > if FindStringExact isnt a member of Listbox then from what is it?


    FindStringExact is a member of System.Windows.Forms.ListBox, not of
    System.Web.UI.WebControls.ListBox.
    --
    John Saunders
    johnwsaundersiii at hotmail
     
    John Saunders, Jun 5, 2004
    #4
  5. Hi Richard,

    In addition to loop through the DropDownList or ListBox WebControl's Items
    collection to find a certain item via text, we can also make use of the
    DropDownList/ListBox 's Items Collection, it's an instance of the
    System.Web.UI.ListItemCollection class which has the following two methods:

    #ListItemCollection.FindByText Method
    http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWebUIWebContro
    lsListItemCollectionClassFindByTextTopic.asp?frame=true

    #ListItemCollection.FindByValue Method
    http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWebUIWebContro
    lsListItemCollectionClassFindByValueTopic.asp?frame=true

    I believe they'll be helpful to you. Thank.

    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    Steven Cheng[MSFT], Jun 9, 2004
    #5
  6. Hi Richard,

    Have you had a chance to check out the suggestions in my last reply or have
    you got any further ideas on this issue? If you have anything unclear or if
    there're anything else we can help, please feel free to post here. Thanks.

    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    Get Preview at ASP.NET whidbey
    http://msdn.microsoft.com/asp.net/whidbey/default.aspx
     
    Steven Cheng[MSFT], Jun 11, 2004
    #6
  7. Richard

    Richard Guest

    I did it throu an other way by looping throu al records, i am unclear if
    this is the best way but it worked for me.

    Dim intID As Integer
    Dim iLoop as Integer
    Dim dt as DataTable = ddlDataSet.Tables("tbl_Filiaal")
    For iLoop = 0 to dt.Rows.Count - 1
    If F_ID = dt.Rows(iLoop)("F_ID").ToString() then
    intID = iLoop
    exit for
    End If
    Next iLoop
    lbFiliaal.SelectedIndex = intID

    and sorry for my late answer.

    thx for your help

    Richard



    "Steven Cheng[MSFT]" <> schreef in bericht
    news:...
    > Hi Richard,
    >
    > Have you had a chance to check out the suggestions in my last reply or

    have
    > you got any further ideas on this issue? If you have anything unclear or

    if
    > there're anything else we can help, please feel free to post here. Thanks.
    >
    > Regards,
    >
    > Steven Cheng
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
    > Get Preview at ASP.NET whidbey
    > http://msdn.microsoft.com/asp.net/whidbey/default.aspx
    >
     
    Richard, Jun 13, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    2
    Views:
    847
    Matt Getting
    Jul 24, 2003
  2. Replies:
    0
    Views:
    358
  3. tshad
    Replies:
    2
    Views:
    546
    tshad
    Aug 29, 2007
  4. Andy B
    Replies:
    2
    Views:
    3,181
    Andy B
    Apr 23, 2008
  5. Jason Wood
    Replies:
    1
    Views:
    188
    Bob Barrows [MVP]
    May 25, 2005
Loading...

Share This Page