Solved

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

Posted on 2006-10-19
3
572 Views
Last Modified: 2008-02-07
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
Comment
Question by:mousemat24
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 25

Accepted Solution

by:
nauman_ahmed earned 500 total points
ID: 17766357
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
 

Author Comment

by:mousemat24
ID: 17766438
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
 

Author Comment

by:mousemat24
ID: 17767328
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Add a Condition in ASP Repeater 6 46
Code works but breaks when I add one section 4 29
Can Angular be used with classic asp.net? 3 32
Google Maps with Webforms 1 29
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question