Click here to Skip to main content
15,998,100 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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
Posted

1 solution

//add this event to repeater & do required changes

XML
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 ";

             }
          }
       }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900