Category: textbox

Disable copy paste in textbox asp.net

{0 Comments}

When you make a application where there is need of genuine user input, but most of time user tend to copy and paste in your provided text box where it is single line and multiline textbox. Then you can active these properties as shown below  C# |  copy code |? 1<asp:TextBox ID="TextBox1" oncopy="return false" onpaste="return false" oncut="return false"2 runat="server" />

Read More…

How to limit multiline textbox in asp.net

{0 Comments}

In most of time it has been seen that when you give privilege to enter many character approximately a range of 200 to 600 characters in a multiline textbox, then there is greater chance that your user will enter large chunks of character. Then let’s limit the characters in the multiline text box.  But here …

Read More…

How to limit characters in textbox in asp.net

{0 Comments}

How to limit characters in textbox in asp.net

In your application if, you want to limit your user to enter only limited number of character in textbox provided by you using asp.net. Then you have to add an extra property to your textbox source; that is maxlength=”6”.  This property will limit the textbox according to your limit here it is 6. Before adding …

Read More…

How to disable resizing of multi line text box

{0 Comments}

How to disable resizing of multi line text box

If you have same question similar to below questions then, there is a very simple way to solve this problem all you have to do is to just set its property as shown in following image or codes  How to disable resize grip on multiline textbox How to disable textbox from adjust width and height? …

Read More…

How to set autofocus textbox using JavaScript

{0 Comments}

Following is the JavaScript code which will help you to set focus on text box, on every page loaded. Just keep in mind to change your text box id in get element id function. Except this all you have to add following script in your head or below the body tag.   Javascript |  copy code |? 1<script type="text/javascript">2 window.onload = …

Read More…

How to add calendar extender in textbox asp.net

{0 Comments}

How to add calendar extender in textbox asp.net

See the following step and see how easily you can add calendar extender or calendar to text box in asp.net.  First insert a script manager. Insert a text box in web form Add calendar extender. As shown in following image. Or have look on source code of the page.  HTML |  copy code |? 1 2 <asp:ScriptManager ID="ScriptManager1" runat="server">3 </asp:ScriptManager>4 …

Read More…

background image textbox asp.net

{0 Comments}

A simple setting to change apply background image of textbox in asp.net. You can set style in internal and external style sheet. Or just use your textbox inline css code in asp.net.  HTML |  copy code |? 1<asp:TextBox id="TextBox1" runat="server" style="background-image: url( images/textbox.gif ); border: none;" />

Read More…

Allow html in textbox asp.net

{0 Comments}

In most of cases when you use textfield or textbox and some one enter a html code like<> then its through an error. The reason for that Is asp.net by default stop cross-site-scripting method to avoid hacking or high jacking of application. Then you can allow html in textbox in asp.net by setting  HTML |  copy code |? 1<%@ Page …

Read More…

Auto complete textbox asp.net

{0 Comments}

In this post you will know how to add an Ajax auto complete feature to a textbox in asp.net using c#. Some point which you must remember before applying Ajax to your asp.net form.  There must a script manager on the page  Only one script manager is allowed per page.  Ajax toolkit dll file should …

Read More…