Home All Groups Group Topic Archive Search About
Author
7 Mar 2007 10:29 PM
Brad Isaacs
Using ASP.NET 2.0 with SQL Server 2000

Inside my dropdown list box I am using an SQL DataSource to select the
following data

SELECT RTRIM(c.Name_First) + ' ' + RTRIM(c.Name_Last) AS Contact,
                            c.phone As PriPortPhone
FROM mppaContacts c

Dropdown list box works well .....


Example "Bart Simpson"

First_name = Bart
Last_name = Simpson

DropDownList -->>  RTRIM(c.Name_First) + ' ' + RTRIM(c.Name_Last) AS Contact
ANS:: "Bart Simpson"

How can I parse the blank space I am trying to PARSE it based on the space
that I placed into the string
found in the DropDownlist box???





UPDATE mppaContacts
SET
       [Name_First] = @FirstName
       [Name_last] = @LastName
       [phone]       = @phone


Any ideas would be greatly appreciated........not sure how to extract the
individual names and place them into their specific fields.


Thanks in advance

~Brad


------------------------------
Brad Isaacs

Author
8 Mar 2007 7:22 PM
Brad Isaacs
DropDownList ID = ddlPriPortContact

'Split the strings into 2 halves

Dim P As Integer = ddlPriPortContact.Text.IndexOf(" "c)

Dim FirstName As String = ddlPriPortContact.Text.Substring(0, P)

Dim LastName As String = ddlPriPortContact.Text.Substring(P + 1)



Issue resolved................ thanks anyhow,

~B-RAD!




Show quote
"Brad Isaacs" <bisa***@rogers.com> wrote in message
news:%23kkKbgQYHHA.2640@TK2MSFTNGP06.phx.gbl...
>
>
> Using ASP.NET 2.0 with SQL Server 2000
>
> Inside my dropdown list box I am using an SQL DataSource to select the
> following data
>
> SELECT RTRIM(c.Name_First) + ' ' + RTRIM(c.Name_Last) AS Contact,
>                            c.phone As PriPortPhone
> FROM mppaContacts c
>
> Dropdown list box works well .....
>
>
> Example "Bart Simpson"
>
> First_name = Bart
> Last_name = Simpson
>
> DropDownList -->>  RTRIM(c.Name_First) + ' ' + RTRIM(c.Name_Last) AS
> Contact
> ANS:: "Bart Simpson"
>
> How can I parse the blank space I am trying to PARSE it based on the space
> that I placed into the string
> found in the DropDownlist box???
>
>
>
>
>
> UPDATE mppaContacts
> SET
>       [Name_First] = @FirstName
>       [Name_last] = @LastName
>       [phone]       = @phone
>
>
> Any ideas would be greatly appreciated........not sure how to extract the
> individual names and place them into their specific fields.
>
>
> Thanks in advance
>
> ~Brad
>
>
> ------------------------------
> Brad Isaacs
>
>
>
>

AddThis Social Bookmark Button