Click here to Skip to main content
15,884,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hej,
I am trying to reuse an example of code from 2010 enhancing a TextBox and Button.
The example, and downloading of the code, works well when picking up the code in a Web Site. So it is easy to test.

The article is on this location:
https://www.codeproject.com/Articles/68834/Enhanced-Textbox-Control
and I have left a question there but do anybody look at old articles?

Now, I want to reuse the controls in a web project on the masterpage, to create a UI for a Site Search. So I create a new web project, select the asp.net web application and tries to add the "MyTextBox" to the Site.Master. I just can't get it up running.

Huge problems with registrering of the control, in fact - I am about to give up.

Anyone have any ideas?

Or maybe you can direct me to a piece of code that run on a masterpage and give me an input box with watermark that works and could be turned into UI for a Site Search?

What I have tried:

What have I not tried? I have googled and tried all my ideas.
I can however say that I am using VS2010
Posted
Updated 16-Nov-18 8:15am
v2
Comments
MadMyche 16-Nov-18 11:56am    
There is no guarantee that the author will respond; however, they have published articles earlier this year. Good luck

1 solution

Quote:
Or maybe you can direct me to a piece of code that run on a masterpage and give me an input box with watermark that works and could be turned into UI for a Site Search?

Sounds like you're looking for the placeholder attribute:
The placeholder attribute - <input>: The Input (Form Input) element - HTML: HyperText Markup Language | MDN[^]
asp.net - How do I put hint in a asp:textbox - Stack Overflow[^]

NB: If you're using in instead of a label, then you should be aware of the usability issues:
Don’t Use The Placeholder Attribute — Smashing Magazine[^]
 
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