Highlighting(chaning the color) the part of the text in textbox using javascript or vb.net

Hi Frnds,

Please can u help me how to Highlighting(chaning the color) the part of the text in textbox  using javascript or vb.net

suppose in my text box some words like HAPPY,UNHAPPY,...I have to find those words and highlight measn changing the background color of  those words..

How to do this using javascript or vb.net

please can u help me out..

Thanks
Sandhya

0
sandhyabhavani
11/1/2008 7:12:15 AM
asp.net.client-side 24353 articles. 1 followers. Follow

1 Replies
633 Views

Similar Articles

[PageSpeed] 12

I think you will need to use DIV with runat="server". then you can easily insert html text in it.

You may use it in following way

Dim t As String = "Its really working! I am HAPPY"t = t.Replace("HAPPY", "<font style=""color:green;"">HAPPY</font>")

d.InnerHtml = t

-where "d" is ID of DIV tag made runat="server"

Hope this helps you

0
vinoddanekar
11/1/2008 9:54:51 AM
Reply:

Similar Artilces:

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

Using the Textbox.Text on Dynmaicly Created Textboxes in VB.Net
I found a script that i modified to create textbox fields Dynamicly.  I am now faced with the delimia of figuring out a way to pull the data in those dynamicly created fields.  Since they are not defined, I have not found a way to use a variable to pull the data. Here is the code .aspx   <%@ Page Language="VB" AutoEventWireup="false" CodeFile="DynamicTextboxes.aspx.vb" Inherits="DynamicTextboxes" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-tr...

How to use client-side script(javascript) in DNA using .Net Remoting
Hi all,     It was known that SAO and Singleton object about .Net Remoting. When I Create an object in server side and hosting in IIS's virtual directory,I want to use javascript asynchronous invoking the remote object by HTTP channel, 80 port and SOAP formatter just like XMLHTTP invoking web service. My code as following, <script> objXmlDoc = new ActiveXObject("Msxml2.DOMDocument"); objHttp = new ActiveXObject("Msxml2.XMLHTTP"); strEnvelope = ?? objHttp.onreadystatechange = function() { ...... }   szUrl = "http://ServerNa...

use VB.NET and C#.NET code in the same C#.NET project
All-- Here is a sample that is "off the beaten path", (at least for me). Is it possible, in an ASP.NET application, using the code-behind page building technique, to have both pages written in VB.NET and pages written C#.NET?At http://www.WebLogicArts.com/DemoList.aspx there is a sample that shows that, (contrary to popular belief), it IS possible to mix ASP.NET pages built with C#.NET with ASP.NET pages built with VB.NET in the same VS.NET 2003 project. Note that this is just a "fun" sample to see if it can be done and I do not recommend this practice as a "standard" way of develo...

How to use client-side script(javascript) in .Net Remoting
Hi all,     It was known that SAO and Singleton object about .Net Remoting. When I Create an object in server side and hosting in IIS's virtual directory,I want to use javascript asynchronous invoking the remote object by HTTP channel, 80 port and SOAP formatter just like XMLHTTP invoking web service. My code as following, <script>  objXmlDoc = new ActiveXObject("Msxml2.DOMDocument"); objHttp = new ActiveXObject("Msxml2.XMLHTTP"); strEnvelope = ?? objHttp.onreadystatechange = function() { ......  }    szUrl = &...

Perform JavaScript Client Side Confirmation from a VB.NET DataGrid
Hi, I when I delete an item from the database through a Datagrid I want to get a messagebox popingup to give me the choise to Confirm it...in case I clicked the wrong item....the way it works now it just deletes it....can any one help me with an Example I have no Idea how to do this...I found an article in C# but it didnt help me at all. here is my source code <asp:DataGrid ID="dgCustList" Runat="server" AutoGenerateColumns="False" DataKeyField="id" AlternatingItemStyle-BackColor="#F6F6F6" HeaderStyle-BackColor="#C4B58E" CellSpacing="0" CellPadding="2" GridLines="Vertical" Width="100%"...

In datawindow.net,access the database from client side event using javascript
In powerbuilder,for example,a datawindow has two columns:itemno,description. input an itemno,validate it.if not found from the database,return 1 to trigger itemerror event; if found,get the description of the item from the database,and fill it into the column "description". The question is how to fulfill the function in web datawindow,through web service? if so,I need an example to realize it. You will need to use AJAX or make a round trip on item change event. -- Dean Jones CEO PowerObjects http://www.powerobjects.com (612) 339-3355 Ext. 112 TeamSybase * *...

Local Client-side printing using server vb.net code?
Hi,Rather than use the window.print() command which is just a form dump.  I want to use vb.net code to do this as it has all the features necessary.I came across this useful article from developers.com.  http://www.developer.com/net/net/article.php/3102381However, when I run this it throws an exception because there is no default printer attached to the server.  Of course I don't want to print server side - thats no good.  But print client side.  The users would print to whatever print queue on the network they have connected to their own pc.I thought ...

use of vb.net and c#.net
i make a small website using vb.net,  in it i make a 2 class in C#.net. that i want to use in that website, i dont know how to call that class. let your class is  - class clsMyClass    {        public void myFunction()        {            // do something        }    } now the first way - create objectclsMyClass myObj = new clsMyClass();myObj.myFunction(); // call function================...

Generating Color 3d-Chart in VB.NEt using 2 giving colors and number of colors as argument
I was wondering if anyone has an idea of how I can program a color-gradient value capturing function. My program will recieve 2 values as input ( StartColor and EndColor). The function will then return an array of 20 colors that exist between the two inputted colors. What I then intend to do with the values returned, is create an XML file and then using the gradient values to plot a 3d Chart or Graph. Does anyone have any idea how I can go about dealing with this? Can anyone help please?.NET Newbie...

how can i write this line using vb.net : container.dataitem ?.... in vb.net its not working
Dim container As GridView = CType(newLinkButton.NamingContainer, GridView) Dim dataValue As Object = DataBinder.Eval(container.dataitem, _ColName)   _ColName its just a string a name of the field in my database   This is Vb.Net code man what you want? You can convert any format from this link http://www.developerfusion.com/tools/convert/vb-to-csharp/  If this post is answer of your question then don't forgot to Click Mark As Answer...

When to use client side varidation and server side varidation in .net?
In .net or classic web application we can varidate user data either on client isde or server side. How to select which side varidate to be used? Thanks! Generally, I use both client and server validation. I make sure the input is in the correct format and reasonably valid on the client, then I verify the data on the server. The extent of validation also depends on the type of data that I need to validate.Here are a few references:Validating ASP.NET Server ControlsIntroduction to Validating User Input in Web FormsClient-Side Validation for ASP.NET Server ControlsSecurity Checklist...

How to use InterBase with VS.NET (vb.net)??
Hi all; Q1:How can I use "InterBase" as a RDMS with Visual Studio.NET (VB.NET) for developing a small application?? Q2:What should I use for a Data Provider? Q3:How ConnectionString will be build?? Thanks in advanced!Regards,CS4Ever~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Dont forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you a point and marks your thread as Resolved so we will ALL know you have been helped. This will help me, you and others....

Using Javascript in vb.net
Is it possible to use javascript in vb.net? I want to fire a JAvascript method when the user clicks on a webform button. The button is used to delete a record, and I want to fire a javascript alert box. When the user clicks on ok, the record should be deleted.... Any thoughts on how to do this will help me... ThanksGod's great button.attributes.add("onclick", "return confirm('Are you sure?');") It is always possible ... The difference here is that you want to use the javascript clientside and the vb.net server side ... Neither talks to each otherVerh...

Web resources about - Highlighting(chaning the color) the part of the text in textbox using javascript or vb.net - asp.net.client-side

File:Map of Florida highlighting Franklin County.svg - Wikipedia, the free encyclopedia
I, the copyright holder of this work, release this work into the public domain . This applies worldwide. This file contains additional information, ...

RBA's subtle highlighting of capital gains tax, not negative gearing, over housing
There's a subtle difference between the RBA's submission to a government housing inquiry and the opening statement by its head of financial stability, ...

Apple shares new “If it’s not an iPhone, it’s not an iPhone” ad highlighting Apple Pay
... AAPL Company continue reading at 9to5Mac . What do you think? Discuss "Apple shares new “If it’s not an iPhone, it’s not an iPhone” ad highlighting ...

Highlighting A Law Professor Who’s Helping To Support Vaccination
The public interest fight for vaccinations has already begun.

Spotify Launches ‘Year in Music’ Highlighting 2015 Listening Habits
... In addition, the site allows users to create a Year in Music card for their stats, which can be shared on social media. Outside of highlighting ...

Highlighting 5 Possible Last-Minute Impact MLB Waiver Deadline Steals
There figures to be more than a few waiver trades in MLB before the August 31 cutoff date next week. Over the next few slides, we'll take a look ...

The student who lost his Facebook internship after highlighting a huge privacy flaw says it was an 'incredible ...
Harvard student Aran Khanna was due to work as an intern at Facebook this summer. However, after he highlighted a massive privacy issue in the ...

Blue-letter Bible highlighting OT passages about Jesus is top seller
A Bible with Old Testament passages relating to Jesus marked in blue is the top selling specialty Bible in North America.

Heartbreaking image of drowned toddler goes viral, highlighting severity of ...
Fox News Heartbreaking image of drowned toddler goes viral, highlighting severity of ... Fox News Sept. 2, 2015: Refugees and migrants sit ...

Highlighting notable changes for Patriots since '14 meetings with Colts
ESPN (blog) Highlighting notable changes for Patriots since '14 meetings with Colts ESPN (blog) But Arrington was released in the offseason ...

Resources last updated: 1/19/2016 11:10:46 AM