.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

insert smiley to textbox where the cursor is

Posted By:      Posted Date: September 25, 2010    Points: 0   Category :ASP.Net

Hi , I can insert smiley code to a textbox but to the end of text written in . I want to insert smiley to the place where the cursor is . Below I am pasting my codes ..What kind of modification must I do ?

<IMG onclick="javascript: smileyim('[:D ]');" alt="" src="file:///C|/Inetpub/wwwroot/yeni_site/icon_smile_big.gif">


<SCRIPT language="JavaScript">  
function smileyim(id)
document.Form1.my_textbox.value  = document.Form1.my_textbox.value +  id;


View Complete Post

More Related Resource Links

Hide HoverMenuExtender when cursor is in an associated TextBox

Hi.I use HoverMenuExtenders on TextBoxes to display some info in certain cases (typically; "you did something wrong here" - messages). Thing is, I want the HoverMenuExtender to disappear when the cursor is in its associated TextBox (and the mouse is outside its borders). Right now the HoverMenuExtender is still visible when the user have placed the cursor in a TextBox to write even though the mouse pointer is outside the TextBox.Is this possible? Thanks for any input! 

How to force a textbox to have insert mode off in WPF 4 vb.net.

I need my textboxs on my WPF form to act like the traditional insert key function where you could override characters as you type and not insert them. IE I need to turn off the defualt insert characters feature. It also has to be able to be turned on when needed. Thank you for reading, hope you can help!~Justin

How to insert Button in a TextBox?

and also I'd like to make this functionality for TextBoxes in DataGrid. how can I do that?

Insert html tage to sqlserver database through asp.net textbox(asp.net 2.0)


Insert html tage to sqlserver database through asp.net textbox

Display it lable control

Best regards

CURSOR performance on multiple delete/insert and maybe poor table design


We have table documents and table documents_additonal_data, joined via key (docnum, doctype), important to know is that in documents_additonal_data we just have two more fileds valuetype and value (varchar(MAX)), and every record in doc can have variable 0-n valuetypes so there is no schema enforced in any way.

Now I've made cursor that needs to transfer history data from one older table to docs, must use cursor with order by clause because transaction_id, some bussines logic etc.  In short it takes values, have some IF logic on cursor variables, checks if there is already record for that document, some more IF logic on variables (with few simple selects) and calls insert procedure.

About insert procedure, it doesn't update values but reads current, stores old to XMLvalue (xml made with select) in storage table, deletes current, and inserts new data, reason for that is probably multiple indexes  (docs is primarly 'read from' table) and millions of records, update was slower probably because in add_data on update it usually needs to delete, insert, update in the same time. Insert procedure takes XML parameter for additional_data which is then translated and inserted via exec sp_xml_preparedocum

is there any way to know the position of my cursor - in TextBox control ?


i have in my C# (WinForms) program TextBox control

if i have this text in: `abcd efg hijklmnop`

and i stand with my cursor between `c` and `d`  = position 3

or i stand with my cursor between `h` and `i`  = position 10

how to get this position ?

thank's in advance

Set cursor position in TextBox


Im writing Custom control in asp.net

after AutoPostBack , one Textbox of Custom Control always is focused, but cursor position always is in the first position of TextBox

anything idea that make it at the right of the string in Textbox ?

Thanks a lot !

populate label/textbox from dropdownlist in insert item template


I've been trying to find a solution to my problem for about 2 days now, and have found nothing.  I am new to .net and not really sure how to accomplish this. 

I have 4 tables in a database, Vendors, RepairCos, Cons, ConRepairHistory.   What I'm trying to do is make a page called SendOutForRepair.aspx that has a insert item template where the first control is a dropdownlist that is attached to the Cons table (got this figured out) and is populated with the Serial Number field.  I would like the selection from the dropdownlist to populate the 2nd control (VendorID) that is also from the Cons table.

example record from Cons Table:  Serial number      VendorID
                                                      508585                     1

so when 508585 is selected in the dropdownlist, it would populate VendorID with 1 (this is my issue)

once this happens, the user would fill in the other fields (hours, issue, repairco (al

Textbox Editable GridView in ASP.NET

This article describes how I made a fully editable gridview in C# using ASP.NET 2. The idea is that the GridView looks and works like an Excel spreadsheet. You see all the cells in the table, and you can edit any of the cells you like, and they are automatically updated (i.e. saved to the database). This is very often how people expect data tables to work in web pages, and I've often seen people clicking in vain on un-editable gridview cells, somehow expecting to edit them, and not understanding that they need to click an Edit button at the end of the row.

Highlighting Rows with TextBox OnFocus

In another article I explained that how you can make the rows of the GridView control clickable and highlight them when they are clicked. In this article I will explain that how you can highlight the GridView rows when you focus on the TextBox which is contained inside the GridView control.

Insert value using Table Value Functions

a real gem in Sql Server 2008. mostly people still using Stored procedure may be they shifted to SQL Server but they are not using TVF right now.

Insert Rows with a GridView

In ASP.NET version 1.x, I used the footer on the DataGrid control to insert new rows by placing a series of TextBox, DropDownLists, CheckBoxes etc. controls on it and then handling a save button. This also works with the GridView in version 2.0 but with one major exception: if your data source is empty, the GridView will hide your footer (and header) and only display the EmptyDataText.

Custom Editing Behavior for DataGridView TextBox Columns

For various reasons I'm using a DataGridView instead of a ListView, and while configuring the DataGridView to look like a ListView wasn't much of a problem, there's one thing that got on my nerves, which is the behavior of textbox cells in edit mode: It is much too easy to leave the edit mode accidentally, simply by pressing the cursor keys at the wrong time. For example when the text caret is positioned behind the last character of the textbox cell content, and you press the right arrow key

Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List

This is an example of an editable gridview containing different ASP.NET controls. When user wants to edit values in gridview, she/he can use these controls to edit existing values in Gridview Edit Mode.

Using the Code

Cursor Functions

A cursor allows looping through a record set and performing a certain operation on each record within the set. SQL Server supports three functions that can help you while working with cursors: @@FETCH_STATUS, @@CURSOR_ROWS and CURSOR_STATUS. Cursor functions are non-deterministic.


Defines the attributes of a Transact-SQL server cursor, such as its scrolling behavior and the query used to build the result set on which the cursor operates. DECLARE CURSOR accepts both a syntax based on the ISO standard and a syntax using a set of Transact-SQL extensions.

watermark textbox using Ajax control

This is pretty simple compared to jquery. Since we need refer a dll only. we dont want any script for this. we just include that reference into our website.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend