473,396 Members | 1,996 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,396 software developers and data experts.

question about asp.net and searching functionality

Hello ,

I'm Wieland, I'm new to ASP.net and now I'm developing a web application
that "searches for MPN (manufacturing part numbers) and returns a result. For
example:

User inputs this MPN in a textbox: RN73H2BTTD1002B25 , the info for each
part of the number are described in the image below.

But what happens if user inputs another MPN and changes the last "25" for a
"30" for example ? Some people told me about using RegExp functions, but that
seems not to work in this case, please help me Scott, don't know what to do,
I'm stuck.

<img src="http://www.koaspeer.com/catimages/res58_chart2.gif">

Thanks in advance.

Dec 4 '06 #1
1 859
Hi Wieland,

Regex sounds like your best choice, but we're not going to be able to help
you unless we know what the requirements are for an MPN to be considered
valid, and what an acceptable margin of error would be.

Regex can certainly handle a change in 2 characters since it's used for
pattern matching. What you need to find out is, for example:

Are the last two digits always going to be numbers?
What is the valid range? (e.g., Can there be more than two digits on the
end?)
How much change can be expected in the other components of the MPN?
etc.

You should validate an MPN entered by a user against a Regex and return an
error message to the user for invalid entries. You can design a Regex for
valid input to parse the sections of the MPN and store them into separate
variables, which you can then use as parameters to perform your search on
the database or wherever the data is stored, if that is in fact what you are
doing with the MPN once it has been parsed.

"NET Framework Developer's Guide
..NET Framework Regular Expressions"
http://msdn2.microsoft.com/en-us/library/hs600312.aspx

--
Dave Sexton

"wieland" <wi*****@discussions.microsoft.comwrote in message
news:65**********************************@microsof t.com...
Hello ,

I'm Wieland, I'm new to ASP.net and now I'm developing a web application
that "searches for MPN (manufacturing part numbers) and returns a result.
For
example:

User inputs this MPN in a textbox: RN73H2BTTD1002B25 , the info for each
part of the number are described in the image below.

But what happens if user inputs another MPN and changes the last "25" for
a
"30" for example ? Some people told me about using RegExp functions, but
that
seems not to work in this case, please help me Scott, don't know what to
do,
I'm stuck.

<img src="http://www.koaspeer.com/catimages/res58_chart2.gif">

Thanks in advance.



Dec 5 '06 #2

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

Similar topics

24
by: Uwe Mayer | last post by:
Hi, I have the following inter-class relationships: __main__: (in file LMCMain.py) imports module FileIO defines class LMCMain instanciats main = LMCMain(...) FileIO.py:
19
by: Mark Johnson | last post by:
Oddly enough, in searching Google for web and ngs, I could find only a handful of articles on this problem. I wonder if it's one not typically encountered? I wanted to have three divs that could...
1
by: Chris Holliday | last post by:
Windows 2000/2003 servers We are deploying some B2B functionality that requires data to be submitted to our DMZ web servers. We want to push this data in near real time through the internal...
8
by: Jan Danielsson | last post by:
Hello all, How do I make a python script actually a _python_ in unix:ish environments? I know about adding: #!/bin/sh ..as the first row in a shell script, but when I installed python on...
9
by: Howard | last post by:
I am currently looking at the various packages that are available for software protection. I have a particular question that I'd welcome your feedback on. Background info: I work for a company...
11
by: Mark Yudkin | last post by:
The documentation is unclear (at least to me) on the permissibility of accessing DB2 (8.1.5) concurrently on and from Windows 2000 / XP / 2003, with separate transactions scope, from separate...
0
by: vegasilikit | last post by:
First post to the group in about 5 years. In fall of 2000 the organization that I work for migrated to a statewide govt. database that ran over budget by about 80 million dollars over 10 years...
2
by: Ed | last post by:
I'm rather new to ASP .Net, so I appologize in advance if I'm asking a dumb question here. I've been searching all over the place for an answer and haven't found a single one. I'm working on a...
12
by: Boris Borcic | last post by:
Hello, I am trying to use UI Automation to drive an MS Windows app (with pywinauto). I need to scrape the app's window contents and use some form of OCR to get at the texts (pywinauto can't...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
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...
0
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,...

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.