How to Create Split Function on ASP.NET(VisualStudio.NET)..?


I want to split this ISD-123456872252 number to 5 TextBox...?  How..? 
10/6/2005 5:48:50 AM 93655 articles. 6 followers. Follow

6 Replies

Similar Articles

[PageSpeed] 29
Get it on Google Play
Get it on Apple App Store

Which bits do you want to split?

There are tons of string manipulation features in .NET - look into Substring, compare, IndexOf etc.


Cheers - Damian Barrow
10/6/2005 7:47:41 AM

I  want to split ISD-34535435435355 become 32133-34434-43243-4333-32433

so each split I want to apear at 5 text box...before that number bocome a split number


10/6/2005 10:04:06 AM
I'm sorry but i can't understand what you are after.
How can you turn ISD-34535435435355 into 32133-34434-43243-4333-32433? They're not even the same length.

You could turn 321333443443243433332433 into 32133-34434-43243-4333-32433 by inserting characters at the required position, splitting the whoel thing into an inmemory array and then allocating the values to the text boxes.


Dim isdStr As String = "ISD-3213334434432434333324332"
' strip off the ISD-
isdStr = isdStr.Replace("ISD-", "")
Dim TxtBox1Text As String = isdStr.Substring(0, 5)
Dim TxtBox2Text As String = isdStr.Substring(5, 5)
Dim TxtBox3Text As String = isdStr.Substring(10, 5)
Dim TxtBox4Text As String = isdStr.Substring(15, 5)
Dim TxtBox5Text As String = isdStr.Substring(20, 5)

You'd have to do some error catching but its one way.

Cheers - Damian Barrow
10/6/2005 12:39:35 PM
 lord wrote:

I  want to split ISD-34535435435355 become 32133-34434-43243-4333-32433

I don't understand what your logic is behind this. How do you get 32133-34434-43243-4333-32433 out of 34535435435355? They are different lengths, and they don't even contain the same numbers.


Victory is mine!!
10/6/2005 10:54:32 PM

Function MakeISD(originalString as String) as String

Return "32133-34434-43243-4333-32433"

End Function


Cheers - Damian Barrow
10/7/2005 7:10:19 AM
And you get the extra functionality that it will turn:

MakeISD("I'm not sure what I want.")

Into the same answer too! Smile [:)]


Wim Hollebrandse
10/7/2005 12:41:03 PM

Similar Artilces:

Implementing .Net Form into an web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

------_=_NextPart_001_01C6429F.D89AA417 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, Net::LDAP Net::LDAPS Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, ....) password? I don't like to write the secret password to the perl file. Best regards Barbara Wilbert ------_=_NextPart_001_01C6429F.D89AA417-- Wilbert Barbara (CI/OSI) * wrote: > Hello, > > Net::LDAP > Net::LDAPS > > Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, > ......

.Net 2.0 Web application using is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one web application using which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

How To Convert web template to Forms Template
I need  Convert web template to Forms Template   There are some free c# to vb converters out there which will allow you to upload a project and convert it to vb.   The programming models for windows forms and web projects are very different there is no way to convert a web to windows forms project.      Silverlight-helpVb TipsSpace Coast .Net User Group Hey Ajax-y, This tool really helps all programmers. I thought I would share this wit...

simple web application created in will not run
I tried to run the samples created by But it doesn't run successfully. For example, I copied VB project folder at C:\Inetpub\wwwroot\VB\Project. From the web browser I typed http://localhost/VB/Project/Project.aspx Only the text for some LabelControls showed up, not the content Text generated by project.aspx.vb. Does that mean that I didn't set the IIS and correct? Can you post the source code for your application. This may make it easier to debug what is going on. Thanks. Glen Kowalski Software Design Engineer / Test Microsoft Corporation This posti...

Visual Studio .NET cannot create or open the application. The likeliest problem is that required components are not installed on the local Web server. Run Visual Studio .NET setup and add the Web Deve
I installed Visual Studio .NET 2003 on Windows Vista Home Premuim, but I'm unable to select "Web Development" item from "Server Components" during the installation. I installed all the pre-requisits but I can not see Front Page Server Extention in the programs. I can see also the IIS. Appreciate if any one can guide me with the solution.   Thanks.   FPSE is not included with Vista, it's a separate download.  See for this. JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. Tha...

non .net form issue within a .net form tag
this may be a bad question... but I am adding a shopping cart to my website and it calls for the following code for the 'buy now' buttons: <form method="POST" action=><input type="hidden" name="ID" value="IDName"><input type="hidden" name="Describe" value="IDName Description"><input type="hidden" name="Price" value="100.00"><input type="hidden" name="QtyMax" value="1"><input t...

Sending SMS using or using or
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...

converting to from offered me some sample code when I signed up with them the only problem is the sample code is in but my page that they type all of their credit card into is <code><%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.IO" %> <script language="C#" runat="server"> void Page_Load(Object Src, EventArgs E) { myPage.Text = readHtmlPage(""); } private String readHtmlPage(string url) { ...

Net Farmers net
Has anyone been able to access any of the tests at ? I can get the default page but none of the tests appear to be operating over the last several weeks. -- CK I just tested and works as usual!!!Every session TCP_error,because my Shields_guard is intact<<G>> -- Regard: Joh@nnes� 1216771 Ont.Inc. "Nothing is more damaging to a new truth than an old error" "CK" <> wrote in message news:9i45gg$1qa9$ : Has anyone been able to access any of the tests at : http://suicide...

To .NET or not .NET, that is the question
I'm running WinXP pro 32-bit, meaning I've got the version 1-dot-something of .NET that XP came with. I've been looking for various softwares, and more and more often come across .NET version 2 being prerequisite. No urgency for me re. my questions to this group - so far I have just decided to hit the red X on those download pages - but the desire for this newer version of .NET seems to be growing for me. Firstly, according to my (limited) research, newer .NET versions are inclusive of the previous ones, and the current version seems to be 3.5. So if I go for i...

net send in .net
Hi,  I am trying to execute net send comman in my code. But I am getting "win32 exception unhandled error". Please help me. My code is:Dim psi As New ProcessStartInfo() psi.UseShellExecute = False psi.FileName = "Net send" '  - IP address of a system in my network psi.Arguments = " test" Process.Start(psi)  Thanks in advance! Shwetha Tryu changing   psi.FileName = "Net send" '  - IP address of a system in my network psi.Arguments = " test&quo...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! Have a look into this links Rajawww.iGold.inDon't forget to click "Mark as Answer" on the post that helped you. This credits that m...

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

creating table in .net (UltraLite.NET)
Hi, Could anyone send me a sample code of how to use a create table query in the api. when I try to do this I get the following error: "A schema upgrade is not currently allowed". I suppose it has something to do with the schemaUpgradeData\listener classes, but I couldn't work it out. I'm using Schema Painter version 9.0.1, build 1751 Thanks According to the online help, this error is caused because something is in use in the database. Try closing all of your cursors/etc. and finishing your current transaction before doing the schema upgrade. ...

Web resources about - How to Create Split Function on ASP.NET(VisualStudio.NET)..? -

VisualStudio Cordova (@VSCordovaTools) on Twitter
Log in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Visual Studio - YouTube
... We'll be sharing useful and insightful videos around ALM, developers, and tutorials. Follow our social channels: ...

Diff File made easy with VisualStudio 11
In my previous post I’ve been critic on the Visual Studio 11 Beta greyed UI (and especially greyed icons!!). Let’s be positive, and frankly it ...

tfsdeleteproject.exe on
... in the last few days and had to look it up each time, I will record it here for posterity. Need to delete a Team Project you created on ...

VisualStudio Engadget
Back to Mobile View Engadget for Windows Phone 7 - get the app now! AOL MAIL Engadget Classic Mobile HD ALT ENGADGET U.S. ESPAGÑOL ???? ???? ...

Followers · VisualStudio · Storify
Create stories using social media. Turn what people post on social media into compelling stories. Collect the best photos, video, tweets and ...

Is SAP Business ByDesign affordable and would you choose it anyway?
SAP has a reputation for being expensive. Even at $149/user/month for a minimum of 25 users Business ByDesign still weighs in at $44,700 per ...

Big Boy and Big Girl Coding
I read “Microsoft’s Top Developers Prefer Old-Schoool Coding Methods” and compared that information with my Google research. I won’t bore you ...

Latest Updates
Latest Updates - Free source code and tutorials for Software developers and Architects.; Updated: 15 Feb 2013

Blogs - Critical Thought Games
Not everything goes as planned, but I like to fix bugs fast. Especially bad ones. The WP7 version of geoDefense has a bad bug in it which causes ...

Resources last updated: 12/16/2015 11:29:59 AM