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
Solved

Concatenate two fields and generate an email address - C#

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

860 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