473,837 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What's the server control equivalent of <input type="image"> ?

Hello,

I have a page which I am converting to use themes. The page has an HTML
<input type="image"> element that is used to post to another page. I
would like to replace this with a server control so I can add a skinid.

I tried adding runat="server" and the skinid to the existing control,
but that didn't work. Any other ideas? TIA

--
Alan Silver
(anything added below this line is nothing to do with me)
Jan 10 '06
17 3218
Hi Alan,

Well, thanks to you I've been finding out all about Themes. :-)

I have not learned everything, but hopefully enough to keep you going.

HtmlControls all inherit System.Web.UI.C ontrol, which has a SkinID property
and an EnableTheming property. However, not all System.Web.UI.C ontrols are
themeable. There is an attribute called ThemeableAttrib ute, which, if set to
false, disables theming for a Control, regardless of these 2 properties.

The difficult part for me is finding out what Controls are themeable and
what Controls are not. You can't view attributes in the .Net SDK. They are
not documented (unfortunately) . You can view them in Ildasm.exe, but it's
like looking for a needle in a haystack. I tried using the JungleCreatures
..Net decompiler, but it doesn't support version 2.0. Apparently, an
HtmlInputImage Control is not themeable. I searched the WWW for some sort of
list, but came up empty. It seems for now your only alternative is to do
what you've been doing in order to find out.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.

"Alan Silver" <al*********@no spam.thanx.inva lid> wrote in message
news:71******** ******@nospamth ankyou.spam...
Hello,


OK, I found the source of my problem...

My skin file contains a definition for an ImageButton, but the control I'm
using *isn't* one of those, it's an <input type="image"> control, which is
an HTML control. ImageButton is a web server control, not an HTML control.

The problem is that it seems you can't skin HTML controls!! You look in
the SDK, and you see that they have a SkinID property, you look in the
info on skinning and you don't see any disclaimer telling you that you
can't skin an HTML control, but if you try adding the following to your
skin file...

<input type="image" skinid="imgBask et" src="images/basket.gif" width="119"
height="20" runat="server" />

... you get a parser error "The control type
'System.Web.UI. HtmlControls.Ht mlInputImage' cannot be themed" when you try
and run the page.

So either I'm doing something wrong and there's another way of applying a
skin to an HTML control, or there's a hole in the framework functionality
that is emphasised by an apparently useless property (SkinID).

I would point out that HTML controls also have an EnableTheming property,
which does imply that they can be skinned, but I can't find out how to do
it.

Anyone any idea about this?

--
Alan Silver
(anything added below this line is nothing to do with me)

Jan 11 '06 #11
>Hi Alan,

Hello
Well, thanks to you I've been finding out all about Themes. :-)
Oh well, at least one of us has benefited from this ;-)

Themes are good aren't they?
I have not learned everything, but hopefully enough to keep you going.
Oh well, that makes two of us!!
HtmlControls all inherit System.Web.UI.C ontrol, which has a SkinID property
and an EnableTheming property. However, not all System.Web.UI.C ontrols are
themeable. There is an attribute called ThemeableAttrib ute, which, if set to
false, disables theming for a Control, regardless of these 2 properties.
Yeah, but it's true by default, so that's a bit of a red herring.
The difficult part for me is finding out what Controls are themeable and
what Controls are not. You can't view attributes in the .Net SDK. They are
not documented (unfortunately) . You can view them in Ildasm.exe, but it's
like looking for a needle in a haystack. I tried using the JungleCreatures
.Net decompiler, but it doesn't support version 2.0. Apparently, an
HtmlInputIma ge Control is not themeable. I searched the WWW for some sort of
list, but came up empty.
Me too. I can't understand why this isn't documented. Having the
EnableThemeing and SkinID properties implies they can be themed, and I
couldn't find any docs to say otherwise. You don't even get an error,
just a lack of theming. Sounds like an oversight on MS's part if you ask
me. They should have done this a bit better.
It seems for now your only alternative is to do
what you've been doing in order to find out.


At the moment I am contemplating rewriting some code to avoid using the
<input> tag. This feels wrong, but I can't see any other way around it.
Now that 2.0 supports cross-page posting, I should be able to do what I
want with server controls, but that means rewriting, retesting, etc. I
was right on the point of deploying the site as well. Ho hum.

Thanks anyway. If you find out anything more, please report back.

--
Alan Silver
(anything added below this line is nothing to do with me)
Jan 11 '06 #12
Hi Alan,

With the advent of aspect-oriented programming, and Microsoft's upcoming
"Windows Communication Foundation" ("Indigo")produ ct, which uses
aspect-oriented programming, and therefore, attributes quite a bit, I think
MS will have to re-examine how they document their .Net classes. If you're
going to make extensive use of attributes, it makes sense to document them,
and how they affect behavior.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.

"Alan Silver" <al*********@no spam.thanx.inva lid> wrote in message
news:mp******** ******@nospamth ankyou.spam...
Hi Alan,


Hello
Well, thanks to you I've been finding out all about Themes. :-)


Oh well, at least one of us has benefited from this ;-)

Themes are good aren't they?
I have not learned everything, but hopefully enough to keep you going.


Oh well, that makes two of us!!
HtmlControl s all inherit System.Web.UI.C ontrol, which has a SkinID
property
and an EnableTheming property. However, not all System.Web.UI.C ontrols are
themeable. There is an attribute called ThemeableAttrib ute, which, if set
to
false, disables theming for a Control, regardless of these 2 properties.


Yeah, but it's true by default, so that's a bit of a red herring.
The difficult part for me is finding out what Controls are themeable and
what Controls are not. You can't view attributes in the .Net SDK. They are
not documented (unfortunately) . You can view them in Ildasm.exe, but it's
like looking for a needle in a haystack. I tried using the JungleCreatures
.Net decompiler, but it doesn't support version 2.0. Apparently, an
HtmlInputImag e Control is not themeable. I searched the WWW for some sort
of
list, but came up empty.


Me too. I can't understand why this isn't documented. Having the
EnableThemeing and SkinID properties implies they can be themed, and I
couldn't find any docs to say otherwise. You don't even get an error, just
a lack of theming. Sounds like an oversight on MS's part if you ask me.
They should have done this a bit better.
It seems for now your only alternative is to do
what you've been doing in order to find out.


At the moment I am contemplating rewriting some code to avoid using the
<input> tag. This feels wrong, but I can't see any other way around it.
Now that 2.0 supports cross-page posting, I should be able to do what I
want with server controls, but that means rewriting, retesting, etc. I was
right on the point of deploying the site as well. Ho hum.

Thanks anyway. If you find out anything more, please report back.

--
Alan Silver
(anything added below this line is nothing to do with me)

Jan 12 '06 #13
>Hi Alan,

With the advent of aspect-oriented programming, and Microsoft's upcoming
"Windows Communication Foundation" ("Indigo")produ ct, which uses
aspect-oriented programming, and therefore, attributes quite a bit, I think
MS will have to re-examine how they document their .Net classes. If you're
going to make extensive use of attributes, it makes sense to document them,
and how they affect behavior.


Unfortunately, my web site can't wait that long!!

It would have been nice if they'd got the documentation clear at this
stage!!

Ta ra

--
Alan Silver
(anything added below this line is nothing to do with me)
Jan 12 '06 #14

Kevin Spencer wrote:
I tried using the JungleCreatures
.Net decompiler, but it doesn't support version 2.0. Apparently, an
HtmlInputImage Control is not themeable.


Hi Kevin,

We do have a 2.0 version of our Decompiler.NET product available on our
web site that decompiles 2.0 and 1.1 assemblies. Licensed customers can
use their licenses with either the 1.1 and 2.0 versions. We also
provide a free version to MSDN subscribers that decompiles .NET
Framework assemblies 100% in the browser UI. You can download the 2.0
version of the product from the 2.0 link on the products page on our
web site at:
http://www.junglecreatures.com/Deskt...ndex=3&tabid=3

Jonathan Pierce
President
Jungle Creatures, Inc.
http://www.junglecreatures.com/

Jan 14 '06 #15
Thanks Jonathan. I will look into it. You have an excellent product there!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.

<jp*****@nyc.rr .com> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .

Kevin Spencer wrote:
I tried using the JungleCreatures
.Net decompiler, but it doesn't support version 2.0. Apparently, an
HtmlInputImage Control is not themeable.


Hi Kevin,

We do have a 2.0 version of our Decompiler.NET product available on our
web site that decompiles 2.0 and 1.1 assemblies. Licensed customers can
use their licenses with either the 1.1 and 2.0 versions. We also
provide a free version to MSDN subscribers that decompiles .NET
Framework assemblies 100% in the browser UI. You can download the 2.0
version of the product from the 2.0 link on the products page on our
web site at:
http://www.junglecreatures.com/Deskt...ndex=3&tabid=3

Jonathan Pierce
President
Jungle Creatures, Inc.
http://www.junglecreatures.com/

Jan 14 '06 #16
>Apparently, an HtmlInputImage Control is not themeable. I searched the
WWW for some sort of list, but came up empty. It seems for now your
only alternative is to do what you've been doing in order to find out.


ASP.NET is just brilliant!!

I was working on another site his morning, and came across my first need
to do cross-page posting. This was so easy that I'm going to redo the
above-mentioned code with a cross-page post, removing the need for an
HtmlInputImage control. I can just use a normal server control and set
the PostBackUrl property.

Just thought I'd post this up for the benefit of anyone reading this
later. No you can't theme the HtmlInputImage, but it's very possible you
won't need to as cross-page posting is really easy.

I'm still excited about it ;-) Childish really!!

Ta ra

--
Alan Silver
(anything added below this line is nothing to do with me)
Jan 16 '06 #17
Good stuff, Alan! I was unaware of this new feature, and looked it up.
Thanks for sharing what you learned!

--

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.

"Alan Silver" <al*********@no spam.thanx.inva lid> wrote in message
news:tj******** ******@nospamth ankyou.spam...
Apparently, an HtmlInputImage Control is not themeable. I searched the
WWW for some sort of list, but came up empty. It seems for now your only
alternative is to do what you've been doing in order to find out.


ASP.NET is just brilliant!!

I was working on another site his morning, and came across my first need
to do cross-page posting. This was so easy that I'm going to redo the
above-mentioned code with a cross-page post, removing the need for an
HtmlInputImage control. I can just use a normal server control and set the
PostBackUrl property.

Just thought I'd post this up for the benefit of anyone reading this
later. No you can't theme the HtmlInputImage, but it's very possible you
won't need to as cross-page posting is really easy.

I'm still excited about it ;-) Childish really!!

Ta ra

--
Alan Silver
(anything added below this line is nothing to do with me)

Jan 16 '06 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
13094
by: Gregory | last post by:
Hello, I'm trying to do the above in order to process an image and return the result to an html image control. It fails and my key suspects are either the variable that I'm passing in - ImageName - for processing, or the return data which is done (or not as the case may be) by imagejpeg($img) in the script, after header("Content-type: image/jpeg"). Any insights would be most welcome, especially debugging techniques and a pointer to...
8
3010
by: Eric Bragas | last post by:
What is this? <img src="{$ ImagesDir}/photo.gif"> I KNOW what an HTML image tag looks like. But what do you call that in the file source? Is it like a virtual directory in IIS? It's some type of variable obviously, but can somebody tell me what it's called so I can research how it works? thanks.
5
10460
by: Mikko Rantalainen | last post by:
See example at <URL:http://www.cc.jyu.fi/~mira/moz/formtest.php>. The problem is that the label of submit button is always centered on the button regardsless of 'text-align' property in CSS. Considering that I can style everything else, this must be a bug, right? Any suggestions how to fix the issue with Mozilla 1.4? How about other versions of Mozilla? How about other browsers? (I'm aware that some people think that one should never...
1
3299
by: Mark Sandfox | last post by:
Is there a way to restrict the user to only selecting and sending either a ..gif or .jpg. Everything I have read says this option can not be done by design (security reasons). I find that irronic as this is the reason (security) that I want to restrict their selection. Any help on this one will be greatly appreciated. The page is using ASP.NET.
2
2771
by: Alan Silver | last post by:
Hello, If I have the following HTML... <input type="image" src="fred.gif"> .... is there a way to specify the image in CSS rather than in the HTML? TIA
3
2266
by: =?Utf-8?B?V2lsbA==?= | last post by:
I have an image "button" which causes a postback. I handle the "click" with If Request.Form("btnBU7WD6_Submit.X") 0 Then... this works great. However, when a user double-clicks the image button the Page_Load (postback) is processed twice. This is a problem. Is there any easy way to detect that the image button has been double-cliked
0
9846
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9683
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10579
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10633
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9412
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7814
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5674
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4479
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4050
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.