Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi,

I am having a strange issue.
The psrec_txt text box is defined in the design view, but it's showing the name pasrec_txt does not exist in current context in the code behind file.

Can someone please help me.

Below is the code:
C#
mail.To.Add(new MailAddress(pasrec_txt.Text));
Posted
Updated 1-Apr-12 5:16am
v2
Comments
André Kraak 1-Apr-12 11:16am    
Edited question:
Added pre tags
Sergey Alexandrovich Kryukov 11-Mar-13 13:20pm    
Please don't post non-answers as "solution". It can give you abuse reports which eventually may lead to cancellation of your CodeProject membership.
Comment on any posts, reply to available comments, or use "Improve question" (above).
Also, keep in mind that members only get notifications on the post sent in reply to there posts.
—SA

for pasrec_txt, runat="server" is there?
 
Share this answer
 
v2
Well, you answered your own question really:
the psrec_txt textbox is defined in the design view

(new MailAddress(pasrec_txt.Text)
Perhaps if they both used either psrec_txt or pasrec_txt it would work?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900