[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Durk van Veen

3/29/2002 9:03:00 PM

I created a new control (myList) that inherits from the factory List
control. I've also created a new WML adapter for the control and now I want
it to start using it. Currently because the control inherits from List, it
uses WmlListAdapter based on settings in machine.config. I'm trying to get
it to hook properly through changing the web.config for my project. I've
created a new device based on the existing WML device called
myWmlDeviceAdapters as follows:

<device
name="myWmlDeviceAdapters"
inheritsFrom="WmlDeviceAdapters"
predicateClass="System.Web.UI.MobileControls.Adapters.WmlPageAdapter"
predicateMethod="DeviceQualifies"
pageAdapter="System.Web.UI.MobileControls.Adapters.WmlPageAdapter">
<control
name="myCustomControls.Web.UI.MobileControls.myList"

adapter="myCustomControls.Web.UI.MobileControls.Adapters.myWmlListAdapter"
/>
</device>

When I run my project I get an error which seems to indicate that the class
cannot be found:

Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.
Parser Error Message: Type 'myCustomControls.Web.UI.MobileControls.myList'
used as control not found.
Source Error:

The assembly is situated in the BIN subdirectory for the mobile web project
though. Any ideas?

Durk


1 Answer

Durk van Veen

3/30/2002 2:39:00 AM

0

OK, solved my own problem. The deal is that since the classes containing
both the control and the adapter are not inside System.Web.Mobile.DLL (which
contains the section handler for the <mobileControls> tag), you have to
specifically tell it in which assembly to look for the classes. The
corrected <control> tag reads:

<control
name="myCustomControls.Web.UI.MobileControls.myList,myCustomControls"

adapter="myCustomControls.Web.UI.MobileControls.Adapters.myWmlListAdapter,my
CustomControls"
/>

Notice the assembly name after the comma in the "name" and "adapter"
properties.

Durk

"Durk van Veen" <drumnbass40@hotmail.com> wrote in message
news:uBbKNy11BHA.428@tkmsftngp03...
> I created a new control (myList) that inherits from the factory List
> control. I've also created a new WML adapter for the control and now I
want
> it to start using it. Currently because the control inherits from List, it
> uses WmlListAdapter based on settings in machine.config. I'm trying to get
> it to hook properly through changing the web.config for my project. I've
> created a new device based on the existing WML device called
> myWmlDeviceAdapters as follows:
>
> <device
> name="myWmlDeviceAdapters"
> inheritsFrom="WmlDeviceAdapters"
> predicateClass="System.Web.UI.MobileControls.Adapters.WmlPageAdapter"
> predicateMethod="DeviceQualifies"
> pageAdapter="System.Web.UI.MobileControls.Adapters.WmlPageAdapter">
> <control
> name="myCustomControls.Web.UI.MobileControls.myList"
>
> adapter="myCustomControls.Web.UI.MobileControls.Adapters.myWmlListAdapter"
> />
> </device>
>
> When I run my project I get an error which seems to indicate that the
class
> cannot be found:
>
> Description: An error occurred during the processing of a configuration
file
> required to service this request. Please review the specific error details
> below and modify your configuration file appropriately.
> Parser Error Message: Type 'myCustomControls.Web.UI.MobileControls.myList'
> used as control not found.
> Source Error:
>
> The assembly is situated in the BIN subdirectory for the mobile web
project
> though. Any ideas?
>
> Durk
>
>