Results 1 to 9 of 9

Thread: Help Please how to code check boxes :(

  1. #1
    New Member
    Join Date
    Apr 12
    Posts
    4

    Help Please how to code check boxes :(

    Hi,
    New to this site really need some help currently doing my dissertation and stuck as i am using a asp.net website and using vb to query my sql database although i need to use check boxes but have no clue how to code them in vb could any one give me an example i want to use 4 check boxes to show the information of which ever is picked.

    I would be really grateful as im running out of time thanks guys!

  2. #2
    New Member
    Join Date
    Apr 12
    Posts
    4

    Re: Help Please how to code check boxes :(

    Forgot to mention there Linq queries thank you

  3. #3
    Frenzied Member
    Join Date
    Sep 02
    Location
    Columbus, Ohio
    Posts
    1,814

    Re: Help Please how to code check boxes :(


  4. #4
    Member
    Join Date
    May 10
    Location
    Abu Dhabi
    Posts
    60

    Re: Help Please how to code check boxes :(

    Do you want to display a result set in check box list?

  5. #5
    New Member
    Join Date
    Apr 12
    Posts
    4

    Re: Help Please how to code check boxes :(

    Sorry i didn't explain it too well its linq to sql but im querying in vb im doing a website that lets you pick different features such as fuel, bodytype etc in check boxes i have a 2 table database called make and model and i just want to be able to check the boxes in terms of what features i want on a car then to click a button and to show the results of what i want to be picked from the database in a gridview table.

    in vs if i double click on the checkbox and it takes me to the vb page i dont know what code to right i.e checkbox = true etc.and what i put in the vb for the button in order to get the result showing.

    hope that's better got till Friday to finish it :/ thanks guys

  6. #6
    New Member
    Join Date
    Apr 12
    Posts
    4

    Re: Help Please how to code check boxes :(

    its a asp.net website too if thats any help thanks again

  7. #7
    Member
    Join Date
    May 10
    Location
    Abu Dhabi
    Posts
    60

    Re: Help Please how to code check boxes :(

    Hi..

    Probably this would help you,

    Code:
            If IsPostBack = False Then
                Dim db = New Linq2SQLDataContext
                Dim chks = From CHECK In
                           db.CHECKs
                           Where CHECK.RevCtrID = 3
                           Select CHECK.CheckNumber
    
                For Each chk In chks
                    CheckBoxList.Items.Add(chk)
                Next
            End If
    First of all you need to know how to connect to SQL database with Linq. please google or visit youtube to know about Linq with SQL.

    Thank you,

  8. #8
    PowerPoster techgnome's Avatar
    Join Date
    May 02
    Posts
    21,659

    Re: Help Please how to code check boxes :(

    You will get a better response by posting in the right section. I've asked the mods to move it to the ASP.NET section.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.-I also subscribe to all threads I participate, so there's no need to pm when there's an update.*
    *Proof positive that searching the forums does work: View Thread *
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *
    * Use Offensive Programming, not Defensive Programming. * On Error Resume Next is error ignoring, not error handling(tm).
    "There is a major problem with your code, and VB wants to tell you what it is.. but you have decided to put your fingers in your ears and shout 'I'm not listening!'" - si_the_geek on using OERN

  9. #9
    Super Moderator Joacim Andersson's Avatar
    Join Date
    Jan 99
    Location
    Sweden
    Posts
    13,446

    Re: Help Please how to code check boxes :(

    Moved to the ASP.Net forum.
    Joacim Andersson
    Microsoft MVP, MCSD, MCSE, Sun Certified Java Programmer
    If anyone's answer has helped you, please show your appreciation by rating that answer.
    I'd rather run ScriptBrix...
    Joacim's view on stuff.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •