Results 1 to 9 of 9

Thread: confirmation box

  1. #1

    Thread Starter
    Addicted Member KingSatan's Avatar
    Join Date
    Feb 2006
    Posts
    185

    confirmation box

    do any of you have any idea on where to start on a confirmation box?

    ok the user clicks delete on a datagrid.... i want a box to pop up asking if they really want to delete the item with yes or no as the buttons on it.
    know what i mean???

    im using all template columns in my datagrid and asp 1.1 alos vs c# 2003

  2. #2
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    Re: confirmation box

    Hi,
    i hope u r using link button in grid for delettion having name lnkbtnDelete...u can use this in datagrid's itemdatabound event...
    --- put item and alternate item condition before this
    Code:
    lnkbtnDelete = e.Item.FindControl("lnkbtnDelete")
    lnkbtnDelete.Attributes("onclick") = "javascript:return " & _
                    "confirm('Are you sure you want to delete this record. ?')"

    i hope this will help u...

    Regards,
    Ritesh
    Last edited by riteshjain1982; Jun 1st, 2007 at 12:56 PM.

  3. #3

    Thread Starter
    Addicted Member KingSatan's Avatar
    Join Date
    Feb 2006
    Posts
    185

    Re: confirmation box

    yeah sorry im not too clear about things when i post i post in a hurry cause im piled full of stuff.

    but yeah im using link buttons... im also using VS 2003 c#

  4. #4
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: confirmation box

    I've done confirmation stuff like that before without the need for a popup... I'm pretty sure that delves into javascript, which I like to avoid at all costs. My solution was when the user clicked, say, "Delete", I had a panel next to it that contained confirmation text and two more link buttons. On that first click, all that happened was the second panel was made visible. Inside that panel, if they clicked the Yes button, the action would take place... if they hit No, the panel disappeared. Slick system, easily noticable, no javascript.

    You can also do a similar thing with <div> tags if you feel like it. Panels worked fine for me, though.

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: confirmation box

    So did that work for you or not?

  6. #6

    Thread Starter
    Addicted Member KingSatan's Avatar
    Join Date
    Feb 2006
    Posts
    185

    Re: confirmation box

    nope

    javascript would look more professional

  7. #7
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: confirmation box

    So you're going to knock down my idea before you even try? You'd be surprised how professional it looks when it's done right.

  8. #8

    Thread Starter
    Addicted Member KingSatan's Avatar
    Join Date
    Feb 2006
    Posts
    185

    Re: confirmation box

    d00d it doesnt work.

  9. #9
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: confirmation box

    Yes it does.

    How do I know this? Because I do it. I have it working flawlessly. And it looks very professional.

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