在中继器中查找Ajax WaterMark文本框 [英] Find Ajax WaterMark textbox inside a repeater

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

问题描述

朋友,

我有一个举报人,里面有一个带有Ajax水印的文本框.根据不同的值,水印应更改

例如:如果文本框值为airpot,则水印应为"Enetr airpot"
如果文本框的值为铁路",则水印应为"Enetr铁路详细信息"

问题是如何在转发器内找到一个ajax水印文本框

任何帮助将不胜感激


问候
Chinnu

Hi Friends,

I''m having a repaeter and inside that i hav a textbox with ajax watermark. Based on different values the water mark should change

eg: if textbox value is airpot then watermark should "Enetr airpot"
and if textbox value is Railway then watermark should "Enetr railway details"

Problem is how to find an ajax Watermark textbox inside a repeater

Any help will be appreciated


regards
Chinnu

推荐答案

//将此事件添加到转发器&进行必要的更改

//add this event to repeater & do required changes

void Repeater_ItemDataBound(Object Sender, RepeaterItemEventArgs e) {

        
          if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) {

             
           TextBoxWatermarkExtender txbWaterMark    = (TextBoxWatermarkExtender )e.Item.FindControl("RatingLabel");


//if(some condition to check whether textbox contains airport )
txbWaterMark.WatermarkText= "airport";

//if(some condition to check whether textbox contains airport )
txbWaterMark.WatermarkText= "railway ";

             }
          }
       }


这篇关于在中继器中查找Ajax WaterMark文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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