Subject: Update Skin Object From Module
Prev Next
You are not authorized to post a reply.

AuthorMessages
Ken IngramUser is Offline
New Poster
New Poster
Posts:4

07/02/2010 10:34 PM  

Does anyone know how I can update a skin object from a module?  I have a skin object that displays some running totals and I would like to have it update from code within a module.  A user action in the module needs to trigger an update in the skin object.

Any ideas?

Thanks,

Ken

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:6089

07/02/2010 10:42 PM  
You would need to build in a method in your custom skin object to allow it to be updated.

-Mitchel Sellers
Microsoft C# MVP, MCITP
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

For shared hosting I recommend PowerDNN

This site is hosted on a Dedicated Server from PowerDNN.com

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
Ken IngramUser is Offline
New Poster
New Poster
Posts:4

07/02/2010 11:11 PM  

Thank you Mitchell for the quick reply.  How would I access the method in the skin object?  Register it in the module's ascx just like it is registered in the skin?  A really brief example would really help.

Thanks again.

Ken

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:6089

07/02/2010 11:17 PM  
No, you would need to developer an API, have the module reference the skin object and do an update.

-Mitchel Sellers
Microsoft C# MVP, MCITP
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

For shared hosting I recommend PowerDNN

This site is hosted on a Dedicated Server from PowerDNN.com

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
Ken IngramUser is Offline
New Poster
New Poster
Posts:4

07/02/2010 11:29 PM  

I can see how the module could reference the skin object's DLL and then call a method, but how would the module know where the instance of the skin is? I've successfully written some modules and a skin object (BTW I read your book on Module Programming... very nice), but I am at a loss as to how the data would get to the skin.  By referencing a method in the DLL, wouldn't that be just the class and not the instance of the class?

Ken

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:6089

07/02/2010 11:35 PM  
You would need to update the database, or whatever is used to store the data, then re-direct back to the page so that the skin object would naturally refresh itself.

-Mitchel Sellers
Microsoft C# MVP, MCITP
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

For shared hosting I recommend PowerDNN

This site is hosted on a Dedicated Server from PowerDNN.com

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
Ken IngramUser is Offline
New Poster
New Poster
Posts:4

07/02/2010 11:40 PM  

Hmm.  My data is already updated in the database from the module, so I just need to redirect the page maybe.  I thought there may be a direct way of communicating with the skin object.

Ken

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:6089

07/03/2010 11:28 AM  
There isn't a built in way to communicate, you could build something yourself, or more than likely a redirect to the page is just as easy, and elegant.

-Mitchel Sellers
Microsoft C# MVP, MCITP
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

For shared hosting I recommend PowerDNN

This site is hosted on a Dedicated Server from PowerDNN.com

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
You are not authorized to post a reply.
Forums >Development Discussion >DotNetNuke > Update Skin Object From Module



ActiveForums 3.7