Pb with Skins for buttons inside a wizard StartNavigationTemplate

  • Thread starter Thread starter WT
  • Start date Start date
W

WT

Hello,

I use to adapt skins in codebehind , using OnPreInit to set buttons skins
depending inner parameters.

This works perfectly but not for buttons inside a StartNavigationTemplate, I
find butons, set the skin but the new value I set is not kept and when I
enter in OnInit I can check thta the old original value for my buttons
skinID has come back ???

here is the declaration
<StartNavigationTemplate>
<table cellpadding='0' cellspacing='0' width='100%'>
<tbody>
<tr align='center'>
<td >
<asp:ImageButton ID="StartCancelButton" runat="server" SkinID="cancel_en"
CommandName="Cancel" CausesValidation="False" />
<asp:ImageButton ID="StartNextButton" runat="server" SkinID="setupnext_en"
CommandName="MoveNext" />
</td>
</tr>
</tbody>
</table>
</StartNavigationTemplate>



And codebehind in OnPreInit

Control ctl = FindControlDeep(CreateUserWizard1,"StartCancelButton");
if (ctl != null)
{
Trace2.WriteLine(string.Format("StartCancelButton Skin: {0}",ctl.SkinID ));
ctl.SkinID = "cancel_" + ext;
Trace2.WriteLine(string.Format("after StartCancelButton Skin:
{0}",ctl.SkinID ));
}

What is the mistery with these templates ?

CS
 
Only way I found was to create templates in codebehind and replace the
declaratives ones which were too restrictive.

CS
 
Hi CS,

I tried your code but it works fine on my side. From your description I
think the SkinID is reset in a phase between PreInit and Init but without
repro code I'm not sure where it is.

Could you send me a demo that can reproduce this problem? My email is
(e-mail address removed) update here after sending the project in case I
missed that email.

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi CS,

Have you sent the project to me?

Regards,
Allen Chen
Microsoft Online Support
 
Back
Top