none
update list item on click on hyperlink in sharepoint list item

    Question

  • I create one list  having some items like id,name,hyperlink

    Now what I want when i click on hyperlink I want to change the name by dotnet code.

    So where Can I write the code in event handler or how to write my code to get this click event on hyperlink?
    Tuesday, January 12, 2010 11:09 AM

Answers

  • You could complete the same using a custom application aspx page. Have the link point to your page, say reloaditem.aspx?ID=X&Source=currentPath, then the code in the page deletes it and recreates it then returns the user back to the list.
    David Lozzi
    Delphi Technology Solutions
    SharePoint Blog  |  LinkedIn | Twitter

    ** SharePoint users be aware! The command "stsadm -o uninstall" works, and it doesn't warn you, it simply uninstalls SharePoint! It happened to me!
    • Marked as answer by Chengyi Wu Tuesday, January 19, 2010 2:39 AM
    Tuesday, January 12, 2010 3:32 PM

All replies

  • Hi,
         Can you give brief description about your problem. ? So you want to change item on click to hyper link as like in Title.
    Or through another interface.



    Regards
    Milan  
    Tuesday, January 12, 2010 11:25 AM
  • Actually waht I want,
    I had created a list and a webpart having button.
    When I press the button the data is inserted in the list.
    Now I want to refresh that data( delete perticular items and reinsert that item. I have one unique value for that)

    So I insert one field of type hyperlink in list.
    When user click on that link the data for that item gets deleted and reinserted in that list.
    Tuesday, January 12, 2010 11:46 AM
  • Hi vyanku,
                       I am not able to understand why you have taken hyperlink field. 

                       What you can do is, create field type as single line text or number as unique identifier. Normally number is good practice to take unique identifier. 

     So when second time before inserting value check if that unique identifier exist or not.  IF it exist then delete that item.

    as  item.delete()
         list.update(). This will update list  and then you can insert new value.


    Regards
    Milan C.
    Tuesday, January 12, 2010 11:58 AM
  • No I want to delete the item which user had selected and reinesrt the same item  from another database.

    Tuesday, January 12, 2010 12:39 PM
  • You could complete the same using a custom application aspx page. Have the link point to your page, say reloaditem.aspx?ID=X&Source=currentPath, then the code in the page deletes it and recreates it then returns the user back to the list.
    David Lozzi
    Delphi Technology Solutions
    SharePoint Blog  |  LinkedIn | Twitter

    ** SharePoint users be aware! The command "stsadm -o uninstall" works, and it doesn't warn you, it simply uninstalls SharePoint! It happened to me!
    • Marked as answer by Chengyi Wu Tuesday, January 19, 2010 2:39 AM
    Tuesday, January 12, 2010 3:32 PM
  • Ok got that. I will try this.
    Tuesday, January 12, 2010 4:12 PM