Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 23rd, 2007, 02:10 PM
Authorized User
 
Join Date: Jun 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vishwjeet
Default Skin Custom Control

Hi All,

I am creating a custom control(just to try) by simply deriving a class from a standard webcontrol as following:

public class MyButton : Button
{
}

But skin is not being applied to this button. I am manually setting the skinID in PreInit:

    protected void Page_PreInit(object Sender, EventArgs e)
    {
        MyButton mb = new MyButton();
        mb.Text = "This is a custom button";
        mb.SkinID = "Button_Default";
        this.form1.Controls.Add(mb);
        btnPostBack.SkinID = "Button_Default";


btnPostBack is working fine with the Skin but mb is not displaying the skin.

- Vishu
__________________
- Vishu





Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Server Control....Custom Property Editor ZArrinPour ASP.NET 1.0 and 1.1 Basics 1 June 15th, 2010 11:30 AM
Web Service, Custom Control, Custom Return Type robzyc ASP.NET 2.0 Basics 6 June 10th, 2008 08:03 AM
custom control angelboy C# 2005 9 March 24th, 2008 04:30 PM
custom control inside custom control issues StevesonD ASP.NET 2.0 Professional 1 February 19th, 2008 06:54 PM
Help! Custom Server Control using User Control diehard ASP.NET 1.0 and 1.1 Professional 2 January 4th, 2006 12:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.