Solved

Concatenate two fields and generate an email address - C#

Posted on 2007-03-29
2
445 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Code works but breaks when I add one section 4 30
How can I do Unit Testing with Session ? 1 23
Data organization issue 7 38
asp.net web app 3 26
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 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