SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast lucky20's Avatar
    Join Date
    Oct 2010
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    edit the row by clicking on rowid

    I have table which displaying ItemId and Item Name..

    If I click on Itemid i can edit the row there.. instead of going to another page.

    is that possible in ASP?
    For that which table i have to use? is there any datagrid or grid view table avilable like in .net..

    can any one give some information on that so that i can proceed.

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,629
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    It's quite simple. As ever, you need to simply think through the requirements.

    What do we know?
    * You can send information to the exact same page as you are using to display information
    * You can process ASP code before showing any HTML code.

    What can we do?
    * Setup the link to go to the same page, but have some parameters that we can check
    ---- page.asp?itemid=1&edit=true
    * Check for the edit and so show an edit form rather than the whole page
    ---- If Request.Querysting("edit") = "true" AND Len(Request.Querysting("itemid")) > 0 Then
    * When the edit form is submitted, check for THIS, do the database updates then show the normal table.

    Of course, there are far more elegant ways of doing this (e.g.using Javascript/AJAX to pass the itemid to an ASP page and then populate the details in a hidden DIV that gets displayed when you wish to edit, then submitting the edits updates the database and refreshes the current page). However such mechanisms are WAAAAY beyond your current abilities, so let's take baby steps for now.

    Think about how you might do what you want to do, code something up then come back for help on why it doesn't work (or maybe it will?), then we can help you. If you don't try to do something yourself then all that will happen is that other people end up building your application for you in a piecemeal fashion, and you end up with an application that is a right dog's dinner to maintain. (And you don't actually learn anything).
    Ian Anderson
    www.siteguru.co.uk

  3. #3
    SitePoint Enthusiast lucky20's Avatar
    Join Date
    Oct 2010
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't have any problem to do that.. I am confusing here is where to start..

    do we need to specify an itemid's as link..I don't want to go another page. I want to do the edit there itself..

    Thanks for giving help..

    any way i will try this ...

  4. #4
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,629
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    It doesn't have to be a link - it could be a button, or radio button or even a checkbox. However there needs to be SOME way of identifying WHICH record is to be edited. And since each record is defined by its itemid then that's what you need to use.

    I've already outlined a process, so that's where you start.
    Ian Anderson
    www.siteguru.co.uk


Bookmarks

Posting Permissions

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