Solved

Concatenate two fields and generate an email address - C#

Posted on 2007-03-29
2
431 Views
Last Modified: 2012-05-11
Hello,

I have an asp.net page with a linkbutton. My form has two fields ("fname" and "lname") from which I would like to auto-generate an email address which is populated to the "email" field (example below). If the "fname" or "lname" (or both) is blank when the link button is clicked, an error should be displayed. I am using a code behind file and C#.
<fname> Joe
<lname> Dirt
  [linkbutton]
<email> joe.dirt@nowhere.com

If this is not enough information, please let me know.
0
Comment
Question by:austerhaus
2 Comments
 
LVL 12

Accepted Solution

by:
craskin earned 125 total points
ID: 18820435
did you want this to happen client-side? because for server-side, it's just

FirstNameTextBox.Text + "." + LastNameTextBox.Text + "@nowhere.com"
0
 
LVL 1

Author Comment

by:austerhaus
ID: 18826543
Great! Thanks for your help.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now