PC Review


Reply
Thread Tools Rate Thread

How to convert NameValueCollection to string?

 
 
=?Utf-8?B?d2FsdGVy?=
Guest
Posts: n/a
 
      31st Aug 2005
Here is my question: Request.QueryString on asp.net is typed as
NameValueCollection. But there is strange behavoir-- I can simply use
Request.QueryString , or public function ToString() to return a
well-formatted string, ie. param1=1&param2=2..., but when use the same code
on other NameValueCollection object, it only return the class name.

I'm wondering 1. how .NET framework achieve this? by adding logic to check
if it's QueryString object ? 2. Is there a simple way,other than looping thru
kind of labor work, to convert a NameValueCollection object to a
well-formatted string ?

Thanks.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert 'System.Collections.ObjectModel.ReadOnlyCollection(Of String)' to '1-dimensional array of String'. roidy Microsoft VB .NET 12 17th Jul 2009 10:53 AM
Split string to NameValuecollection Alex Schlecht Microsoft C# .NET 5 15th Mar 2006 02:37 PM
exposing NameValueCollection Property through ASPX page ? (string representation of its values) sonic Microsoft ASP .NET 1 7th Jan 2005 06:15 PM
What is the easiest why to convert NameValueCollection to XML? Julia Microsoft C# .NET 0 17th Oct 2004 10:03 AM
Converting a QueryString-TYPE string to a NameValueCollection Yuri Vanzine Microsoft ASP .NET 0 18th Aug 2003 06:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:06 AM.