Skin and custom controls (ASP 2.0)

F

Frédéric Mayot

Hi
I'm trying to define a skin for a custom control. I can't see how to do
it...
My custom control inherits from a TextBox but it doesn't recognize the
skinID defined for asp:TextBox.
Any idea ?
Thanks,
Fred
 
P

Patrice

Does it work without a skin id ? (it would perhaps help to see if this is
because the file is not in a proper directory or if there is a problme with
how the kinid is indicated or perhaps to see if theming is properly
enabled).

Patrice
 
F

Frédéric Mayot

The problem is that I can't specify the skin in the skin file. I can write
<asp:TextBox ...>
But I can't write
<??:MyTextBox ...>

MyTextBox inherits from TextBox. When I specify the skin Test for
asp:TextBox and if I put skinID=Test in the MyTextBox attribute, it ignores
it.
 
F

Frédéric Mayot

No, I think it is the default is true as it inherits from a TextBox.
But event if it is marked as Themeable, I still don't know what to put in
the skin file...

Brock Allen said:
Did you mark you control with the [Themeable(true)] attribute?




The problem is that I can't specify the skin in the skin file. I can
write
<asp:TextBox ...>
But I can't write
<??:MyTextBox ...>
MyTextBox inherits from TextBox. When I specify the skin Test for
asp:TextBox and if I put skinID=Test in the MyTextBox attribute, it
ignores it.
 
B

Brock Allen

Ok, then the only other thing I can think of is that you didn't put in the
@Register directive in your .skin. This works for me:

<%@ Register TagPrefix="cc" Namespace="Brock" Assembly="__code" %>
<cc:MyControl runat="server" Text="hello with SkinID" SkinID="foo" />
<cc:MyControl runat="server" Text="hello no SkinID" />




No, I think it is the default is true as it inherits from a TextBox.
But event if it is marked as Themeable, I still don't know what to put
in
the skin file...
Did you mark you control with the [Themeable(true)] attribute?

The problem is that I can't specify the skin in the skin file. I can
write
<asp:TextBox ...>
But I can't write
<??:MyTextBox ...>
MyTextBox inherits from TextBox. When I specify the skin Test for
asp:TextBox and if I put skinID=Test in the MyTextBox attribute, it
ignores it.
"Patrice" <[email protected]> a écrit dans le message de %[email protected]...

Does it work without a skin id ? (it would perhaps help to see if
this is
because the file is not in a proper directory or if there is a
problme
with
how the kinid is indicated or perhaps to see if theming is properly
enabled).
Patrice
--

"Frédéric Mayot" <[email protected]> a écrit dans le message de

Hi
I'm trying to define a skin for a custom control. I can't see how
to
do
it...
My custom control inherits from a TextBox but it doesn't recognize
the
skinID defined for asp:TextBox.
Any idea ?
Thanks,
Fred
 
F

Frédéric Mayot

OK, I'm very sorry, it worked, one of my developper said it wasn't possible
to use @Register tag in the skin id file.
Thanks a lot

Brock Allen said:
Ok, then the only other thing I can think of is that you didn't put in the
@Register directive in your .skin. This works for me:

<%@ Register TagPrefix="cc" Namespace="Brock" Assembly="__code" %>
<cc:MyControl runat="server" Text="hello with SkinID" SkinID="foo" />
<cc:MyControl runat="server" Text="hello no SkinID" />




No, I think it is the default is true as it inherits from a TextBox.
But event if it is marked as Themeable, I still don't know what to put
in
the skin file...
Did you mark you control with the [Themeable(true)] attribute?


The problem is that I can't specify the skin in the skin file. I can
write
<asp:TextBox ...>
But I can't write
<??:MyTextBox ...>
MyTextBox inherits from TextBox. When I specify the skin Test for
asp:TextBox and if I put skinID=Test in the MyTextBox attribute, it
ignores it.
"Patrice" <[email protected]> a écrit dans le message de %[email protected]...

Does it work without a skin id ? (it would perhaps help to see if
this is
because the file is not in a proper directory or if there is a
problme
with
how the kinid is indicated or perhaps to see if theming is properly
enabled).
Patrice
--

"Frédéric Mayot" <[email protected]> a écrit dans le message de

Hi
I'm trying to define a skin for a custom control. I can't see how
to
do
it...
My custom control inherits from a TextBox but it doesn't recognize
the
skinID defined for asp:TextBox.
Any idea ?
Thanks,
Fred
 
G

Guest

Hi Brock,

I am developing an asp.net application using c# and asp.net 2.0 beta 2. I
started developing this page usign beta1. In beta 1 I have written some code
in Page_LoadComplete(object sender, EventArgs e) events of page. It was
working fine. But after I installed beta 2.0 Page_LoadComplete events is not
firing at all. Can u guide me how can I achieve this goal?

Thankx in advance.
Shailesh.

Brock Allen said:
Did you mark you control with the [Themeable(true)] attribute?




The problem is that I can't specify the skin in the skin file. I can
write
<asp:TextBox ...>
But I can't write
<??:MyTextBox ...>
MyTextBox inherits from TextBox. When I specify the skin Test for
asp:TextBox and if I put skinID=Test in the MyTextBox attribute, it
ignores it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top