473,387 Members | 1,321 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

find if there is a given substring inside a string

How do I find if there is a given substring inside a string in asp.net ?
Thank you very much!
Nov 19 '05 #1
3 2002
String.IndexOf (...);

Eliyahu

"juli" <ji****@gmail.com> wrote in message
news:1f**************************@posting.google.c om...
How do I find if there is a given substring inside a string in asp.net ?
Thank you very much!

Nov 19 '05 #2
Use String.IndexOf()

If it returns -1 then the string you searched for was not found. If anything
else then it was found.

--
Regards,

Deepak
[I Code, therefore I am]
"juli" <ji****@gmail.com> wrote in message
news:1f**************************@posting.google.c om...
How do I find if there is a given substring inside a string in asp.net ?
Thank you very much!

Nov 19 '05 #3
String.IndexOf()

"juli" <ji****@gmail.com> wrote in message
news:1f**************************@posting.google.c om...
How do I find if there is a given substring inside a string in asp.net ?
Thank you very much!
Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: MyHaz | last post by:
OK i find this a quark in string.find that i think needs some consideration. Normally if a substring is not in the searched_string then string.find returns -1 (why not len(searched_string) + 1,...
6
by: JJA | last post by:
I would like some advice on a data and query problem I face. I have a data table with a "raw key" value which is not guaranteed to be valid at its source. Normally, this value will be 9 numeric...
7
by: zjut | last post by:
I need to implement the method : round(String name, int index) The given string maybe the every type of float type, ( the msdn given the regax is that : integral-digits]exponential-digits]) ...
29
by: Ajay | last post by:
Hi all,Could anybody tell me the most efficient method to find a substr in a string.
14
by: micklee74 | last post by:
hi say i have string like this astring = 'abcd efgd 1234 fsdf gfds abcde 1234' if i want to find which postion is 1234, how can i achieve this...? i want to use index() but it only give me the...
5
gauravgmbhr
by: gauravgmbhr | last post by:
How to find whether a substring is present in the big string or Not The function that finds the substring inside the string should return in true Or False
2
by: emily224 | last post by:
Hello, I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer...
4
by: emily224 | last post by:
Hello, I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer...
4
by: =?Utf-8?B?VG9yZW4gVmFsb25l?= | last post by:
Was editing code, am getting the following errors } expected Type or namespace definition, or end-of-file expected Eyes crossed cannot find code below! using System; using...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.