Solved

Concatenate two fields and generate an email address - C#

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
RegularExpression for Numbers with no decimal points in ASP.net text control 11 55
JavaScript error 1 52
getting id from database 5 37
Re-position the objects 7 95
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

929 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

14 Experts available now in Live!

Get 1:1 Help Now