Thursday, March 22, 2012

windows controls on asp.net pages

hi,

is it possible to put a windows control on an asp.net page? I need a windows
listbox on an asp.net page to store objects in it. the listbox control of
asp.net can't store objects (only strings).

thank you very much

uwe from germany
(sorry for my bad english)Theoretically you can do this, but you would need every client to have
dotnet installed in his/her machine. On sever site there is plenty of
classes capable of holding objects. What are you trying to achieve?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"Uwe Thiemann" <colafee@.web.dewrote in message
news:uA4Uoqw1GHA.4752@.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

hi,
>
is it possible to put a windows control on an asp.net page? I need a
windows listbox on an asp.net page to store objects in it. the listbox
control of asp.net can't store objects (only strings).
>
thank you very much
>
uwe from germany
(sorry for my bad english)
>


"Eliyahu Goldin" <REMOVEALLCAPITALSeEgGoldDinN@.mMvVpPsS.orgwrote in
message news:uZ9jTuw1GHA.1132@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

Theoretically you can do this, but you would need every client to have
dotnet installed in his/her machine. On sever site there is plenty of
classes capable of holding objects.


Quite so.

Let's say, for the sake of argument, the objects in question have a unique
identifier, a description, and then a load more properties e.g.

MyObject.ID
MyObject.Description
MyObject.OtherProperty1
MyObject.OtherProperty2

etc

I would store the objects in a Dictionary<string, MyObjectwhere the key of
the Dictionary is MyObject.ID.

Then I would create a DropDownList using MyObject.ID as internal value and
MyObject.Description as visible text for the users to select.

Thereafter it would be a simple matter to interrogate the SelectedValue of
the DropDownList, fetch the associated MyObject out of the Dictionary and
carry out whatever processing was necessary...
>Theoretically you can do this, but you would need every client to have

Quote:

Originally Posted by

Quote:

Originally Posted by

>dotnet installed in his/her machine. On sever site there is plenty of
>classes capable of holding objects.


Meaning that only Windows clients (excluding Windows 95 clients)
will be able to use your pages.
Linux or Mac users will be left out.

But I guess you knew that already.

--

Riki

0 comments:

Post a Comment