question

ethaimarket avatar image
0 Likes"
ethaimarket asked ·

additem with ItemSpecifics using asp.net

I'm trying to add ItemSpecifics to my additem reqest.  But all the example of code I can find show the .NET SDK examples  and I need something that will work with an asp.net page (using webservices).  I have everything else working except for this section.  Can someone give me a little help on how to convert it?  Thanks

.NET SDK code snippet

'Add Item Specifics
item.ItemSpecifics = New NameValueListTypeCollection()

Dim ItemSpecs As New NameValueListTypeCollection()

Dim nv1 As New NameValueListType()
Dim valueCol1 As New StringCollection()

nv1.Name = "Brand"
valueCol1.Add("Ralph Lauren")
nv1.Value = valueCol1

ItemSpecs.Add(nv1)

Dim nv2 As New NameValueListType()
Dim valueCol2 As New StringCollection()
nv2.Name = "Size"
valueCol2.Add("L")
nv2.Value = valueCol2
ItemSpecs.Add(nv2)

Dim nv3 As New NameValueListType()
Dim valueCol3 As New StringCollection()
nv3.Name = "Colour"
valueCol3.Add("Black")
nv3.Value = valueCol3
ItemSpecs.Add(nv3)

item.ItemSpecifics = ItemSpecs

10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
developer-support@ebay.com avatar image
0 Likes"
developer-support@ebay.com answered ·

Hi,

If you still are stuck and need help with your conversion please file a ticket with us at http://developer.ebay.com/support/developersupport/request/default.aspx

Please provide us with your APPID, along with any other subsequent information needed.

Best Regards,

eBay Developer Support

 

· 1 · Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks, but it looks like I must pay a  of $75 to find a solution?

 

when editing the code in Visual Studio it puts "wavy blue lines" (doesn't understand or like) the code at the following parts;

"NameValueListTypeCollection" on the line "item.ItemSpecifics = New NameValueListTypeCollection()"
"NameValueListTypeCollection" on the line "Dim ItemSpecs As New NameValueListTypeCollection()"
"valueCol1" on the line "nv1.Value = valueCol1" (the same problems on "valueCol2" and "valueCol3")

If I run the code exactly like it is (ignorning the error warnings) I get the following errors;
"
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30002: Type 'NameValueListTypeCollection' is not defined.

Source Error:

Line 1749:            
Line 1750:            'Add Item Specifics
Line 1751:            item.ItemSpecifics = New NameValueListTypeCollection()
Line 1752:
Line 1753:            Dim ItemSpecs As New NameValueListTypeCollection()
 
"
 

0 Likes 0 · ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.