网页中的Ajax水印问题 [英] Ajax watermark problem in web page

查看:71
本文介绍了网页中的Ajax水印问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

haii ..在我的代码中,我添加了Ajax水印扩展器,但它不起作用..这是代码...

haii..in my code I add the Ajax water mark extender ,but it does''t work..here is the code...

<asp:ToolkitScriptManager ID="tsmMachine" runat="server">
                           </asp:ToolkitScriptManager>





<span class="labelbox">
                                    <asp:Label ID="lblMainDisplay" runat="server" Text="Main Display"></asp:Label>
                                </span><span class="field">
                                    <asp:TextBox ID="txtMainDisplay" runat="server" CssClass="textbox" MaxLength="17"></asp:TextBox>
                                    <asp:TextBoxWatermarkExtender ID="tweMainDisplay" runat="server" WatermarkText="Up to 17 characters"

                                        WatermarkCssClass="watermarknormal" TargetControlID="txtMainDisplay">
                                    </asp:TextBoxWatermarkExtender>
                                </span>
                                <span class="labelvalidate">
                                    <asp:RequiredFieldValidator ID="rfvMainDisplay" runat="server" ErrorMessage="*" ControlToValidate="txtMainDisplay"

                                        SetFocusOnError="true" ValidationGroup="MachineDetails"></asp:RequiredFieldValidator>
                                </span>




有什么错误吗? plx help ...




have any error? plx help...

推荐答案

您是否已将Ajax工具包添加到页面中?我的意思是dll! :) TextBoxWatermarkExtender AJAX扩展器可以附加到ASP.NET TextBox控件上,以获取水印"行为.当带水印的TextBox为空时,它将以自定义CSS样式(即您的CSS文件)向用户显示一条消息.asp:TextBoxWatermarkExtender具有以下主要属性:
TargetControlID-TextBox的ID(要在其上添加水印的文本框的名称).
WatermarkText-当控件没有值时显示的文本.(默认文本为水印)
WatermarkCssClass-当CSSBox没有值时应用于CSS的CSS类.
Have you added the Ajax toolkit to your page?I mean the dll! :) TextBoxWatermarkExtender AJAX extender can be attached to an ASP.NET TextBox control to get "watermark" behavior. When a watermarked TextBox is empty, it displays a message to the user with a custom CSS style(i.e your css file)The asp:TextBoxWatermarkExtender has the following main properties given below:
TargetControlID - The ID of the TextBox(name of the textbox where you want the watermark) to operate on.
WatermarkText - The text to show when the control has no value.(default text as watermark)
WatermarkCssClass - The CSS class to apply to the TextBox when it has no value.
<pre lang="vb"><ajaxToolkit:TextBoxWatermarkExtender ID="TBWE2" runat="server"
    TargetControlID="TextBox Name"
    WatermarkText="Watermark text"
    WatermarkCssClass="watermarked" />



这篇关于网页中的Ajax水印问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆