473,322 Members | 1,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Return listview item from webservices

Hi,

This is Govadhan, i am a begginer for web services using c#.net. I
have written a small web service where in i have created a listview
item in the web service method and added some data to the listview
item. Now i have problem. I want this listview to be passed as a
return value to the calling program. can some one help me with how to
achieve this.

I want to return the listview item, can anyone say me is it possible
to convert this listview item to a object type and thn return it. If
this can be done can anyone provide me with the information on how to
achieve this.

Thanks for the help.

This is my email-id : ap****@gmail.com

Regards,
Govardhan

Apr 2 '07 #1
1 1693
Govardhan,

You can't have the signature of the web service method be "object". If
you do, then none of the information about the specific type is going to be
persisted over the wire.

Also, I wouldn't recommend sending a ListViewItem over the wire either.
It suggests a very tight coupling with the UI implementation which kind of
smacks of bad design.

On top of that, the ListViewItem exposes the ListView property. The
ListView is a control that has an affinity to the thread that created it.
Certainly, the thread that is calling the web service doesn't share that
affinity.

What I would recommend doing is creating a simple type of your own which
has the information you need in the ListViewItem and returning that. Then,
on the caller side, you would create the ListViewItem and then populate it.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"apondu" <ap****@gmail.comwrote in message
news:11**********************@d57g2000hsg.googlegr oups.com...
Hi,

This is Govadhan, i am a begginer for web services using c#.net. I
have written a small web service where in i have created a listview
item in the web service method and added some data to the listview
item. Now i have problem. I want this listview to be passed as a
return value to the calling program. can some one help me with how to
achieve this.

I want to return the listview item, can anyone say me is it possible
to convert this listview item to a object type and thn return it. If
this can be done can anyone provide me with the information on how to
achieve this.

Thanks for the help.

This is my email-id : ap****@gmail.com

Regards,
Govardhan

Apr 2 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: VM | last post by:
How can I fill up a listview with text file contents? My listview has two columns and the first column fills up with a while loop: while (myString != null) { myString = sr.Readline();...
1
by: J_Max | last post by:
Hello, This might be a really easy question, but... I am developing a simple Smart Device application that uses a listview. I have a function that adds a item to the listview - code is below. I...
3
by: MikeY | last post by:
Hopefully someone can help me on this. I am using C#, making Windows forms. I have created a listView with checkbox's. I have enabled the checkboxes under the properties, and all the data,...
9
by: Devron Blatchford | last post by:
Hi there, Just wondering if I change the back and fore colour of a listview item when the mouse hovers over it? I want to overide the default windows colour. Can someone please tell me how to...
3
by: Matt Michael | last post by:
I have a listview control and a collection object right now that I'm trying to pass information to and from. Whenever I click on the checkbox, I want it to remove certain listview items and add...
1
by: Savas Ates | last post by:
i created an proxy class .. it named webreference1 my code is like following. how can i learn the return message from wsdl (it works or not) how can i learn it(wsdl's respond) Dim ws As New...
9
by: MSDNAndi | last post by:
Hi, I have a set of simple webservices calls that worked fine using .NET Framework 1.0. I am calling a Java/Apache based webservices, the calling side is not able to supply a proper WSDL. ...
4
by: Pucca | last post by:
How can I tell a mouse right clicks over a listview item that's in a container panel. I only want to display a popup menu if the user right click the mouse over an item on the Listview. I don't...
1
by: apondu | last post by:
Hi, This is Govadhan, i am a begginer for web services using c#.net. I have written a small web service where in i have created a listview item in the web service method and added some data to...
6
by: Brandon McCombs | last post by:
Hello, I have a form that contains a listview on the left side and a column of buttons on the right side. Only some of the buttons do I want enabled all the time. The other buttons should be...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.