Solved

Concatenate two fields and generate an email address - C#

Posted on 2007-03-29
2
410 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

22 Experts available now in Live!

Get 1:1 Help Now