473,387 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

image button inside a textbox control

how to set imagebutton inside a textbox control in asp.net 2008?My aim is to write somethng in this text box and click on the image button inside the text box to clear the textbox.
Jun 15 '11 #1
3 13265
Frinavale
9,735 Expert Mod 8TB
You can not put an image button inside a TextBox.
You can put an image button beside a TextBox though...like this:
Expand|Select|Wrap|Line Numbers
  1. <div>
  2.   <asp:TextBox ID="myTextBox" runat="server" />
  3.   <asp:ImageButton ID="myImageButton" runat="server" ImageUrl="~/theImage.jpg" />
  4. </div> 
-Frinny
Jun 16 '11 #2
It is possible to put image button inside textbox
Follow Below Code :
Expand|Select|Wrap|Line Numbers
  1. <div id="Search">
  2.   <span style="color: White; font-weight: bold">Search : </span>
  3.   <asp:TextBox ID="txtSearch" ToolTip="Press Enter To Search"  runat="server" Width="250px" CssClass="SearchTextBox" ></asp:TextBox>
  4.   &nbsp;&nbsp;
  5.   <asp:ImageButton ID="btnSearch" runat="server"
  6.                                    Text="Search" 
  7.                                    CssClass="MyImageButton"
  8.                                    ImageUrl="~/Images/SearchButton.png" Font-Bold="true" OnClick="btnSearch_Click" />
  9. </div>
-Hansi(India)



@Frinavale
Apr 25 '12 #3
Frinavale
9,735 Expert Mod 8TB
Sorry, you cannot put an image button inside a TextBox.
Apr 25 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Michael | last post by:
Hi ! I'm trying to 'alter' the access TextBox control to achieve the following; When the cursor is over the TextBox control I want to display a button to the right of the TextBox control...
3
by: hermawih | last post by:
Hi , can anyone help me , please . In Ms Rich textbox control , It is easy to insert object than to insert picture . I want to insert picture in my Ms rtf activeX control but Ms Access does...
5
by: Darren Smith | last post by:
Hi There, I have a shopping cart app that displays products along with a textbox (to enter quantity) and an image button to add the item to the shopping cart. Please explain why my below...
1
by: Keith Harris | last post by:
Hi, I have a Repeater control which is bound to a dataset. In the footer of the repeater control, I have a Button whose visibility I want to vary according to the sum of a column being > 0. ...
1
by: amit | last post by:
Hello, I saw on an article that you can capture an image like: ****************** from here ******************* Consider the following HTML definition: <IMG SRC="anything.gif"...
1
by: Phil_Cam | last post by:
Hello All On a webpage I have a standard paypal image button for purchases. I am trying to set it up so that it only shows up or is endabled when text is entered into a textbox and a button is...
1
by: rn5a | last post by:
I want to create a custom control that encapsulates a Button & a TextBox. When the Button is clicked, the user is asked a question using JavaScript confirm (which shows 2 buttons - 'OK' &...
1
by: shapper | last post by:
Hello, I added a TextBox and an Image Button to a page so that they are side by side. Instead of both being top aligned the Text Box is pushed down. Why is that? How can I solve this? ...
0
by: jobs | last post by:
Any way to change the style of a button inside a Login Control? Any way to assign a skin id to the control, that impacts a control (like button) inside the control? thanks for any help or...
2
by: durga2005 | last post by:
Hi I m using C1WebGrid Control.in this I m adding two textboxes and one button at the footer.the new data I entered should get added in database. But I m getting error in the insert statement ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.