473,668 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to know the language of text written in Textbox ?

4 New Member
Hi,
How can we check the language of text entered in the Textbox in ASP.NET, I need to do some calculation based on wether normal english text was entered or UNICODE characters were entered in the TextBox.
Dec 12 '09 #1
8 4848
sanjib65
102 New Member
You may try the link below

http://www.asp.net/(S(ywiyuluxr3qb2d.../video-40.aspx
Dec 12 '09 #2
ssnaik84
149 New Member
difficult.. but you can track it with keycode.. check here
Dec 12 '09 #3
Frinavale
9,735 Recognized Expert Moderator Expert
ASP.NET can pick up on the end user's cultural settings.

It does this based on browser settings so this idea may not be a perfect fit for you....

What I was thinking is that you can use the cultural settings to determine what type of text has been entered into the TextBox.

-Frinny
Dec 14 '09 #4
ssnaik84
149 New Member
No.. it does not help..
I have English (US) in browser settings.. but many times I write articles or feedback in Marathi / Hindi..
धन्यवाद... :)
Dec 14 '09 #5
Frinavale
9,735 Recognized Expert Moderator Expert
That's what I was commenting about ssnaik84.

If you set your browser's cultural settings to Marathi/Hindi then it will detect that you prefer to view things in Marathi/Hindi and your web application (if set up correctly) will display resources accordingly. You should be able to use this to determine what language/culture the user is using. (I did this manually before I knew about the automatic stuff that ASP.NET has built in...so I know it's possible but...).

The problem with this is that the end user will have to be smart enough to set their browsers properly...

I thought that your browser would pick up on your preferred cultural/language settings based on your operating system's cultural/language. I could be wrong here (?) it would depend on the browser's implementation really.

I always give the end user a DropDownList of language/cultural options to select from to indicate what language/culture they want to use to view my web application.

-Frinny
Dec 14 '09 #6
MalikTahirMahmood
4 New Member
well, very thanks to all of you, But the replies are leading to different direction, Let me explain the scenario again. My application is for sending SMS from PC to phone, There is one text box in which user need to type message, now if user types "English only" text then he can send message of 160 characters, but if he write arabic or some other UNICODE characters then he can send 70 chars." so let suppose " if he write message like " hello world" then it means he wrote only english text so to charge client for english message, but if he write message in arabic language or he wrote some arabic words in between the message then message limit would be applied of 70 chars/Msg.. as this is International standard for text Messaging.. I hope i am able to explain you people to exact problem i am facing..
Dec 14 '09 #7
Frinavale
9,735 Recognized Expert Moderator Expert
MalikTahirMahmo od,

Have you considered providing a DropDownList of all the supported language/cultural options that your application supports?

If the user doesn't select the right language then their message will be messed up and it's their own fault....

I'm not sure how to check this server side....(checki ng msdn now)
Dec 14 '09 #8
Frinavale
9,735 Recognized Expert Moderator Expert
I don't know if this is going to work but have you seen the Encoding.GetEnc oding Method??

The thing is that the Encoding class is pretty much used for converting...It 's not really used for checking the Encoding....I don't know how you would do this but I think that looking into the Encoding class would be a good start.

-Frinny
Dec 14 '09 #9

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

Similar topics

6
12726
by: Suresh Kumaran | last post by:
Hi All, Does anybody know the sytax in VB.NET to write the contents of a multiline text box to a text file? Appreciate help. Suresh
5
2187
by: DCSTech | last post by:
On my webpage I have a textbox. I would like to be able to change the text in the textbox and via a pushbutton have the value in the textbox written to the .text property so that next time the page is viewed the new value will be displayed. Thanks for any help
5
1698
by: BLACKDOG157 | last post by:
I've made a form with a variable number of textboxes. The user fills them out, and then I need to pick up the values he has filled in. The number of textboxes vary depending on a value that the user filled in in another page. But suppose there were 3 values. In that case, I know the names of the fields, they are MyTextBox1 MyTextbox2 MyTextbox3
31
21812
by: Kathy | last post by:
I would like to get the old and new value for a change made to a text box so that I can store them in a change history table. What is the best way to do this? I am just learning VB 2005; porting an application from MS Access where I could just use the TextBox.OldValue construct. TIA, Kathy
37
3926
by: jht5945 | last post by:
For example I wrote a function: function Func() { // do something } we can call it like: var obj = new Func(); // call it as a constructor or var result = Func(); // call it as a function
13
3330
by: WALDO | last post by:
I have a .Net TextBox (TextBoxBase, really) in which I am appending about 20 lines of text per second. I use the AppendText() method to accomplish this. This is a great substitute for taking the Text property and concatenating it... Me.tb.Text &= newText ' Instead use Me.tb.AppendText(newText) ....ultimately setting the SelectionStart to the end of TextBox, the
2
1993
Ali Rizwan
by: Ali Rizwan | last post by:
Hello Every Body I want to do if the first letter of textbox is M then textbox show it Muhammad and other data will remain constant. i.e if M Saleem is written in textbox then Muhammad Saleem wll written in textbox And one thing more If i edit some thing in textbox and then goto some other control and when i goto textbox the cursor will have to on the end of text in textbox its urgent. Thanks in Advance
5
6547
by: Rajkiran R.B. | last post by:
Well I have multiple keyboard layouts installed in my system.. I have written a program in C# such that the required input language can be selected using the following piece of code InputLanguage lang = new InputLanguage; private void Form1_Load(object sender, EventArgs e) {
9
11940
by: Phill W. | last post by:
VB.Net 2005 SP1 Windows Forms Application What's the fastest way to append text to a TextBox? I have an application that monitors data written to text files. It needs to scan some fairly hefty files (typically ~15MB) and scanning the file pulling out the rows I want (typically ~10,000 of them) takes /comfortably/ under three seconds. In normal usage, this application will "follow" the end of these files as they are written to, so it...
0
8462
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8381
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8893
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8586
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7401
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6209
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4205
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4380
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.