473,379 Members | 1,257 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,379 software developers and data experts.

exposing NameValueCollection Property through ASPX page ? (string representation of its values)

Hi,

Is there a signature that would allow me to set values for such
properties as NameValueCollection or StringList within ASPX xml
definition ?

example:

myControl has a Values property of type NameValueCollection.
class myControl {
public NameValueCollection Values {...}
}

could i do something like this ?
--main.aspx--
<ctrl:myControl id="..." Values="Name1,Val1--Name2,Val2--" ..>
etc.

I attempt some guess signature that may work, but i get following
errror:
Cannot create an object of type
'System.Collections.Specialized.NameValueCollectio n' from its string
representation 'H,S' for the 'Values' property.

which leads me to believe that it may be possible to represet this
property as string.

Nov 19 '05 #1
1 1253
"sonic" <sq**********@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hi,

Is there a signature that would allow me to set values for such
properties as NameValueCollection or StringList within ASPX xml
definition ?

example:

myControl has a Values property of type NameValueCollection.
class myControl {
public NameValueCollection Values {...}
}

could i do something like this ?
--main.aspx--
<ctrl:myControl id="..." Values="Name1,Val1--Name2,Val2--" ..>
etc.

I attempt some guess signature that may work, but i get following
errror:
Cannot create an object of type
'System.Collections.Specialized.NameValueCollectio n' from its string
representation 'H,S' for the 'Values' property.

which leads me to believe that it may be possible to represet this
property as string.


You'll need a custom type converter which can convert to and from a string
representation. Look up "type converter" on MSDN.

John Saunders
Nov 19 '05 #2

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

Similar topics

5
by: anon | last post by:
I need a little clarity in the NameValueCollection. Within the MSDN .NET 1.1 Framework help is says: "This collection is based on the NameObjectCollectionBase class. However, unlike the...
5
by: anon | last post by:
I need a little clarity in the NameValueCollection. Within the MSDN .NET 1.1 Framework help is says: "This collection is based on the NameObjectCollectionBase class. However, unlike the...
2
by: MrDotNet | last post by:
Hi I want pass NameValueCollection as parameter in webmethod. I try it but that give me error. Here is Error. You must implement the Add(System.String) method on...
2
by: David | last post by:
Hi all, I am developing a CMS with URL Rewriting. This however hides my valid Request.QueryString values, which returns the underlying one that is used by the ReWriting. However, I have a...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.