473,406 Members | 2,619 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,406 software developers and data experts.

adding data from multiline text box

Hello,
I'm new to the asp.net programming world and one of my first projects is
to create an entry form for managers to enter in some information about
their employees. My form has a multiline text box so the manager can add 1
or more employeess. They have to enter in the information as
domain\username. My question is, how can I strip the domain name from the
begining of the username? It has to be stored in a seperate column in the
database, and how can I get each user name in the textbox to add to my
database. I also need to check to make sure the employee exists in my
database, so I first need to verify the employee then if their valid save
them to the database.

what is the best way to do this? how would I do this? I've been doing basic
asp.net development but nothing like this before.


Jul 10 '07 #1
2 4099
If you are using VB you could do something like this:

'this returns the list of users from the text field seperated
'by carriage returns
dim users() as string = txtUserNameField.Text.Split(vbCr)

' this loops through all of the users
for i as integer = to users.length - 1
'this splits up the user name from the domain
'because it is seperated by the "\"
dim networkName() as string = users(i).Split("\")

'to access the user name use networkName(1)
next i

"Steve" <St***@community.nospam.comwrote in message
news:e5**************@TK2MSFTNGP05.phx.gbl...
Hello,
I'm new to the asp.net programming world and one of my first projects
is to create an entry form for managers to enter in some information about
their employees. My form has a multiline text box so the manager can add 1
or more employeess. They have to enter in the information as
domain\username. My question is, how can I strip the domain name from the
begining of the username? It has to be stored in a seperate column in the
database, and how can I get each user name in the textbox to add to my
database. I also need to check to make sure the employee exists in my
database, so I first need to verify the employee then if their valid save
them to the database.

what is the best way to do this? how would I do this? I've been doing
basic asp.net development but nothing like this before.

Jul 10 '07 #2
I'm using C3, but i can covert this over and try it out, thanks
"Jeremy Ames" <an*******@whereever.comwrote in message
news:12**********************************@microsof t.com...
If you are using VB you could do something like this:

'this returns the list of users from the text field seperated
'by carriage returns
dim users() as string = txtUserNameField.Text.Split(vbCr)

' this loops through all of the users
for i as integer = to users.length - 1
'this splits up the user name from the domain
'because it is seperated by the "\"
dim networkName() as string = users(i).Split("\")

'to access the user name use networkName(1)
next i

"Steve" <St***@community.nospam.comwrote in message
news:e5**************@TK2MSFTNGP05.phx.gbl...
>Hello,
I'm new to the asp.net programming world and one of my first projects
is to create an entry form for managers to enter in some information
about their employees. My form has a multiline text box so the manager
can add 1 or more employeess. They have to enter in the information as
domain\username. My question is, how can I strip the domain name from the
begining of the username? It has to be stored in a seperate column in the
database, and how can I get each user name in the textbox to add to my
database. I also need to check to make sure the employee exists in my
database, so I first need to verify the employee then if their valid save
them to the database.

what is the best way to do this? how would I do this? I've been doing
basic asp.net development but nothing like this before.


Jul 10 '07 #3

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

Similar topics

4
by: Michael C | last post by:
Hi all, I'm trying to add lines to a multiline textbox. Here's what I'd like to end up with in the textbox (as an example): Line1 Line2 Line3 I've tried a couple of methods but nothing...
2
by: Chris | last post by:
Hi We are using style sheets to set the font of our labels and text boxes. This has been working great until we required a text box with a textmode of Multiline. The control picks up the...
2
by: Paul Evans | last post by:
Hi, Can anyone help me? I have two text boxes, one single-line and one multiline. I wish to save the text within the multiline textbox as a txt file, with a file name by the text in the...
2
by: Ryan Ternier | last post by:
I'm playing around with DataGrids and the Edit columns ability. I have a text area that can be anywhere from 1-8000 characters. When I add the edit capabilities to this DataGrid it displays a...
5
by: Neo Geshel | last post by:
Greetings. I am in a very big pickle. I am trying to add page content - as well as a submit button - programatically to a web form that is supposed to submit to DB and then refresh. That...
9
by: Neo Geshel | last post by:
I have strip-mined, strip-searched, and completely exhausted the Internet (up to the 30th page on Google, with 100 results per page!!), all without finding an answer to my question AS TO WHY IT...
8
by: Radx | last post by:
Here in my web application, I have a data entry page with serval controls. Some of the controls have autopostback is set true. But the problem is when two or more people are entering data at the...
4
by: ramesh_tankala | last post by:
Hi,,,friends.. i am using multiline text box for storing address ,suppose my multiline control(address) is 2nd one,suppose i move from 1st control to 2nd(address) my cursor placed in begining of...
2
by: King | last post by:
Is there any other way to define multiline text in a XML file: <Help><!]> </Help>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.