Results 1 to 2 of 2

Thread: delete button and listbox

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    delete button and listbox

    hi there

    i know , im sure of it, in vb you can have an onclick event for a listbox or something similar right?

    what about in asp.net?

    what i wanna do:

    i have a listbox with entries filled from a store proc in SQL
    when the user clicks on one of them, i want the delete button to be enabled, then to ask the user if they are sure to delete that record

    i cant find a way of getting the onclick event to work with the listbox - what is it? how can i do that?


    how would u extract text after a certain point in a listbox text or in a textbox?



    Last Q:

    I have a store proc in SQL, which will (hopefully) check to see that if the current ID number passed from vb.net is in use, it will NOT delete that record, and return back "false" or true depending on the circumstances.

    how can i return that value back to a variable in vb.net? or even display that true or false word in a textbox in asp.net/vb.net?

    Thanks!

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Question 1:
    Not going to happen...

    Usually people get around that by using a DataList that includes a delete button either:
    [1] on every row of each item
    [2] or in the header that deletes the selected item

    Question 2:
    Are you lookin to just return a boolean? You can return a Bit (1 or 0) from your SQL proc, and read it using command.ExecuteScalar().

Posting Permissions

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



Click Here to Expand Forum to Full Width