什么是服务器控件等效于< input type =" image"> ? [英] What's the server control equivalent of <input type="image"> ?
本文介绍了什么是服务器控件等效于< input type =" image"> ?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我有一个页面,我转换为使用主题。该页面有一个HTML
< input type =" image">用于发布到另一个页面的元素。我想要用服务器控件取代它,所以我可以添加一个skinid。
我尝试添加runat =" server"和现有控件的skinid,
但是那不起作用。还有其他想法吗? TIA
-
Alan Silver
(此行下方添加的任何内容都与我无关)
解决方案
使用System.Web.UI.HtmlControls.HtmlImage控件。
-
HTH,
Kevin Spencer
Microsoft MVP
..Net开发人员
你可以把鱼带到自行车上,
但需要很长时间,
并且自行车必须*要*改变。
" Alan Silver" <人********* @ nospam.thanx>在消息中写道
新闻:FR ************** @ nospamthankyou.spam ...你好,
我有一个页面,我转换为使用主题。该页面具有HTML
< input type =" image">用于发布到另一个页面的元素。我想
喜欢用服务器控件替换它,所以我可以添加一个skinid。
我尝试添加runat =" server"和现有控制的skinid,但
那是行不通的。还有其他想法吗? TIA
-
Alan Silver
(此行下面添加的任何内容都与我无关)
>使用System.Web.UI.HtmlControls.HtmlImage控件。
这不仅仅是一个简单的< img>标签?我想要一个< input type =" image">标签。
如果你单击一个HtmlImage控件就不会发生什么事情(是吗?)
看看SDK,似乎以下内容应该有效.. 。
< input type =" image" SkinID = QUOT; imgBasket" RUNAT = QUOT;服务器" />
皮肤文件中包含的内容......
< asp:ImageButton skinid =" imgBasket" imageurl =" images / basket.gif"
width =" 119"高度= QUOT; 20" RUNAT = QUOT;服务器" />
然而,它产生以下HTML ...
< input name =" ctl00
cphMainBody
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)
解决方案
Use a System.Web.UI.HtmlControls.HtmlImage Control.
--
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*********@nospam.thanx> wrote in message
news:FR**************@nospamthankyou.spam...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)
>Use a System.Web.UI.HtmlControls.HtmlImage Control.
Isn''t that just a plain <img> tag? I want an <input type="image"> tag.
Nothing will happen if you click an HtmlImage control (will it?)
Looking at the SDK, it seems that the following should work...
<input type="image" SkinID="imgBasket" runat="server" />
where the skin file contains...
<asp:ImageButton skinid="imgBasket" imageurl="images/basket.gif"
width="119" height="20" runat="server" />
however, that produces the following HTML...
<input name="ctl00
cphMainBody
这篇关于什么是服务器控件等效于< input type =" image"> ?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文