How Can I Split A Value Of Variable Into Several Parts?

I have a parameter, directory, which has value of "dir1/dir2/dir3". How can I extract the values of dir1, dir2, and dir3 from the directory="dir1/dir2/dir3". ?

View Replies


ADVERTISEMENT

Splitting A Variable Into Parts

I have a variable named DressCode. The content of this variable is something like N040602
I want to split this variable into four parts:

DressCodea would be the N part
DressCodeb would be the 04 part
DressCodec would be the 06 part
DressCoded would be the 02 part

How do you do this is ASP, so it'll split the variable, no matter what the content is, as long as it is that format (ie 1 letter then 6 numbers).

View Replies View Related

Split Single Variable To Get Multiple Variables

This is a simple question, but is been a while since I program in ASP and I forgot.

I have a variable like this: 01-00005-03

I need to have 3 variables from that single one... Something like this, from that variable, let for example that is called fullvariable, split it and get the following variable values from it.

variable1 = 01
variable2 = 00005
variable3 = 03

View Replies View Related

Referring Other Parts Of ASP

<%
MyAspString = "HELLO"
%>
<script language=vbscript>
sub RUNCODE()
MyVBScriptString = <%MyAspString%>
msgbox MyVBScriptString
end sub
</script>

Is this possible and if so how can I amend the following line to get it working:

MyVBScriptString = <%MyAspString%>

View Replies View Related

Extracting Parts

i want to extract the number 38 from the URL below, using ASP what is the solution?
then store it as a variable.

http://pcol-webtest/default.asp?nc=4098&id=38

View Replies View Related

Split Function To Split First Letters

I have a variable which holds college names

strcollege="University of California"

i want a variable to save UoC

what i meant was there are 3 words University of California

so i want the first letter in each word to be stored in a variable ....

View Replies View Related

Removing Parts Of A Sentence

How do I do the following action in asp:

Suppose I have a string of word which I have pulled from my MSSQL database - "Super Fine Quality"

But I don't want to show the entire sentence "Super Fine Quality" in my page. I just want to show the word "Super" only, ie I want to display only the first word of the sentence regardless of it's length.

Without manipulating or doing anything in the MSSQL database, is it possible to remove the words "Fine Quality" and show the first word of the sentence "Super" only with the help of asp code? If yes please let me know how.

View Replies View Related

How To Hide Parts Of An ASP Page?

I spend more time with other technologies. Could someone please help me with how to hide sections of content on an ASP page? Please keep it simple. I prefer code examples or at the very least point me to a place on the web that can.

View Replies View Related

Parts Drop Down Search

I'm trying to create a part search for mufflers. I would like to do drop downs ex.

Year
- Make
- Model
- Engine

the end result would bring up the part they are looking for and it would link to that part. Kind of similar to a appsearch.aspx. I'm unsure would would work best with this, so if someone could point me in the right direction, that would be awesome.

View Replies View Related

Split Array But On Every Second Split?

I have a string

212334||327362737||437437||47347837||8347834||

etc

but i want to enter them into a databse

but it must be as 1356235 then field 2 is 125662

dont know if this makes sense

each number is a team in a match so team 1 plays team 2, enters into databse
then move on to the next 2, in that array.

i cant seem to get it to do 2 at a time, without ending up with an endless loop or team 2 being team 1 on the second entry.

View Replies View Related

An ActiveX Control On This Page Might Be Unsafe To Interact With Other Parts Of The Page ...

I have an ActiveX control in my ASP page that has not been signed yet, so currently just for testing I set the Security for Intranet to "Low". When I run the ASP page on my machine (the IIS is in my machine), I have no problem, except the page prompted me with "An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction?"

But, when I run the ASP page on another machine (even though the other machine is also a development machine that already has the ActiveX control and I set the Security for Intranet to "Low"), it did not prompt me the above message, and I got an error when accesing any method of the AX control (e.g Object doesn't support this property or method 'myAXControl.method').

Is this because I have to create a CAB file and mark the AX control as safe for scripting ?To create a CAB file for this AX control, do I need to create my own VB AX
Control project that contains this control and then create a cab file for this VB project ?

View Replies View Related

SSN Split

One of my fields is the customer's social security number, all originally
entered as a 9-character string. How can I split and display that into 3-2-4
format?

View Replies View Related

Split

As I can split a string that contains char " "

split(string, " ") it is not correct

View Replies View Related

Split()

What I need to do is get the content of a text file, one line at a time, and break it up using , as a delimiter.

So far I can open the file and print out all the content, but all I am getting is a million ???????'s on the screen, and not the file. Here is what I am using: Code:

View Replies View Related

Split()

How can I calculate the number of the substrings below?

Code:

Dim txt

do until rs.EOF

txt=Split(rs("diastima"), ",")

For i=1 to number_of_substrings
Response.Write txt(i)&"<br>"
next

rs.MoveNext
loop

View Replies View Related

Split First & Last Name

I have value sSearch = Lastname Firstname

I need to split it into two separate field:

sLast = Lastname
sFirst = Firstname

I tried

arrSearch = split(sSearch, " " )

but how do I actually get the values?

View Replies View Related

Split And Do

I need to send a mail for each address I found in one var. The var is as follows:

emails = "onemail@onedomain.com , other@othermail.com , another@another.com "

How Can I make a "do while var not end"?

View Replies View Related

Split Function

I want to take a server variable and split it. It would look something like this:

varServerVariable = fistname.lastname

I want it to look something like:

first = firstname
last = lastname

I know that I need to use the Split Function, but I'm not sure of the syntax.

View Replies View Related

Split Records

Plz guide me on the follwoing..
database=storedb
table=product

for e.g i m having 50 records in databse i would like to display the 10 records
on one page and other on second page and so on.. using asp.

View Replies View Related

Split() Using Database

I have a section where users can add their 'favourite venues' to a list. This is stored in a column in the users table, for example:

10,8,1,18,26

On the user area I can do a select drop-down with all their favourite venues easy.

When I try to use the same (slightly modified) code on the venue detail page to determine whether the user has the venue in their favourite to link either to ADD venue (not currently a fave) or REMOVE venue (already on the faves list) it only recognises the last added venue, i.e. (working on the list above) venue #26.

Here is the code I'm using: Code:

View Replies View Related

Split Up Values

What I'm trying to do is to split up a value into two images.
For example: Rs("num") displays "12". How do i display the 12 as "1.gif" and "2.gif"?

View Replies View Related

Double Split

how can I double split this string and pu the values into an array?

string = 2_3, 4_5, 6_8;6_9, 4_6; 3_1

I need the split after "," and ";"

View Replies View Related

How To Split A Word !!

I am looking for a function to split my string into subsequent parts. I am having a textbox from where user can enter more then one numbers (23, 456, 89, 394 etc), and now I want to write a function which return this sting into this fashion i.e.

23
456
89
394

View Replies View Related

Split For String

there is a method to split a string with a delimiter

checkDelete = Request("checkDelete")
arrayDelete = Split(checkDelete, ",")

my string is Trim(arrayDelete(i)), that has the format "number_number".
I want to put the two numbers in two different variables.

View Replies View Related

Split A Email

i am trying to split an email address into a string.Basically, what i wanna do is take the first part of the email just before the "@" symbol and insert it into the database.
How can I do this using asp?

View Replies View Related

Split A Number

I have this number

var mynum="01-12-09-908"

I want it to be saved in 4 diff variables like

mynum1=01
mynum2=12
mynum3=09
mynum4=908

Can someone tell me how I can do it ....

View Replies View Related

Split Numbers!

The number '60' can be written as (50+10) or (25+35) or (15+45) or (7+53) etc... but I want the output as (50+10) only when 60 is typed in a textbox & the Form is submitted. How do I do this?

View Replies View Related

Split By Linebreak

I am trying to split a return value from a post by the linebreak at the end of each line in the return value ....

View Replies View Related

Split An Array

How can I split an array to string?

View Replies View Related

Array And Split?

i have a text box, where i want to be able to enter items on a one per line basis.

i then need to insert these items into a database.
i have the functionality to insert into the db ...

View Replies View Related

SPLIT Either BOF Or EOF Is True?

I'm pretty new at this so if someone could tell me what I need to do to the foloowing code I would really appreciate it!

strSQL = "SELECT * FROM chapmeetreq2 WHERE chapter = '" & session("chap") & "' and entrydate = '" & date() & "' order by req_id desc" ...

View Replies View Related

Split A Function

I have a textbox that will have this kind of value.
eg. 1+1, 1+2, 1 +2, 1 + 2.....

So now i need to get the 1 and 2 to add it up. This textbox is for add function.

Before this i using the Mid Function. But this is only work if they entered btwn 1 - 9. If 10 then unable to find it.

I remember there is a function where it will find the value then stop at there. then i only grab the bfore the value. I try to lookup but i can't find the function. I need to get the value bfore + and after + to add it up.

View Replies View Related

Split Word

How do I use the split function to break down a single word.

e.g. tree

I would like to be able to split so that:

letter(0) = t
letter(1) = r
letter(2) = e
letter(3) = e

Or is this not possible?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved