Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 576
  • Last Modified:

Urgent: How to delete a record from a Gridview, passing the UNID of the record to a WEB Service method

I need some urgent help in ASP.NET/C# (VS 2005)

I have a gridview, I've created a template column, the column itself displays the word DELETE. I have a WEBService called deletePage(string unid). How do I pass the unid of the record into the WEBService when a user clicks on it?

Thanks
0
mousemat24
Asked:
mousemat24
  • 2
1 Solution
 
nauman_ahmedCommented:
First you will need to generate the proxy class for your web service or in other words add reference to the web service in your project. Then on the Delete event, call the web service method to delete and rebind the grid.

--Nauman.
0
 
mousemat24Author Commented:
nauman_ahmed
I have a proxy class, but I dont know how to get the UNID of the record. This is what I have

TITLE    UPDATED BY     EDIT    DELETE  (Gridview1 columns)

In the delete column, I want to get the UNID of the record and pass that to a web service

hope that makes sense?
Thanks nauman_ahmed
0
 
mousemat24Author Commented:
Hi nauman_ahmed

I've got the delete to work, but I keep getting the following error

Deleting is not supported by ObjectDataSource 'objHandBook' unless the DeleteMethod is specified.

Any idea how I'm supposed to sort this out?

Thanks
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now