Solved

TextBox vs input

Posted on 2011-09-12
7
564 Views
Last Modified: 2012-06-22
I have a field <input  runat ="server" id="email" ..>

This is in a formview. I want to find that control...can I use a Textbox to find it
TextBox email = frmContact.FindControl("email") as TextBox;

Or HTMLControl something?
0
Comment
Question by:Camillia
7 Comments
 
LVL 26

Expert Comment

by:Shaun Kline
ID: 36525862
If you can, you might want to change the control <asp:TextBox ...>.
0
 
LVL 26

Expert Comment

by:Shaun Kline
ID: 36525870
However, if the input type equals text, it should equate to and HTML Control for the text box.
0
 
LVL 7

Author Comment

by:Camillia
ID: 36525886
what if i dont want to use a textbox...what is the control for "input". HTMLxxx??
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 23

Expert Comment

by:Saqib Khan
ID: 36525922
input itself is nothing really.."Type" attribute is required.
<input type="text">
<input type="button">

runat=server attribute makes your controls to be accessed via .Net FrameWork
0
 
LVL 7

Author Comment

by:Camillia
ID: 36526120
i just tried TextBox" and it cant find the control. I do have type="text". But seems like I cant use a TextBox...So it's HTML something?? HTMLInput maybe??
0
 
LVL 7

Author Comment

by:Camillia
ID: 36526134
yes, it's HtmlInputText
0
 
LVL 10

Accepted Solution

by:
P1ST0LPETE earned 500 total points
ID: 36527007
A textbox in HTML is an input of type text.

HTML Textbox = <input type="text" />

Also, an <asp:Textbox> control renders a <input type="text" />
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question