Click here to Skip to main content
15,921,577 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionMVC, Entity Framework, using a separate dll or assembly for website project. Pin
jkirkerx28-Oct-15 9:33
professionaljkirkerx28-Oct-15 9:33 
AnswerRe: MVC, Entity Framework, using a separate dll or assembly for website project. [solved] Pin
jkirkerx28-Oct-15 9:58
professionaljkirkerx28-Oct-15 9:58 
QuestionConverting Rows in columns Pin
byka28-Oct-15 9:32
byka28-Oct-15 9:32 
AnswerRe: Converting Rows in columns Pin
Richard Deeming28-Oct-15 10:03
mveRichard Deeming28-Oct-15 10:03 
GeneralRe: Converting Rows in columns Pin
byka28-Oct-15 10:12
byka28-Oct-15 10:12 
GeneralRe: Converting Rows in columns Pin
Richard Deeming28-Oct-15 10:13
mveRichard Deeming28-Oct-15 10:13 
GeneralRe: Converting Rows in columns Pin
byka20-Nov-15 3:22
byka20-Nov-15 3:22 
GeneralRe: Converting Rows in columns Pin
Richard Deeming23-Nov-15 1:40
mveRichard Deeming23-Nov-15 1:40 
GeneralRe: Converting Rows in columns Pin
byka24-Nov-15 4:13
byka24-Nov-15 4:13 
GeneralRe: Converting Rows in columns Pin
Richard Deeming24-Nov-15 8:48
mveRichard Deeming24-Nov-15 8:48 
GeneralRe: Converting Rows in columns Pin
byka30-Nov-15 1:57
byka30-Nov-15 1:57 
GeneralRe: Converting Rows in columns Pin
Richard Deeming30-Nov-15 2:03
mveRichard Deeming30-Nov-15 2:03 
GeneralRe: Converting Rows in columns Pin
byka30-Nov-15 3:29
byka30-Nov-15 3:29 
GeneralRe: Converting Rows in columns Pin
Richard Deeming30-Nov-15 4:03
mveRichard Deeming30-Nov-15 4:03 
GeneralRe: Converting Rows in columns Pin
byka30-Nov-15 8:54
byka30-Nov-15 8:54 
QuestionAbout ASP.Net Pin
Member 1209320927-Oct-15 20:28
Member 1209320927-Oct-15 20:28 
AnswerRe: About ASP.Net Pin
PANKAJMAURYA27-Oct-15 21:34
professionalPANKAJMAURYA27-Oct-15 21:34 
QuestionUnit testing tool for universal windows 10 app except Unit test app(universal windows) library Pin
Anjani Rajdev27-Oct-15 20:18
Anjani Rajdev27-Oct-15 20:18 
QuestionError: The parameter 'addresses' cannot be an empty string. Pin
Member 876166727-Oct-15 13:27
Member 876166727-Oct-15 13:27 
AnswerRe: Error: The parameter 'addresses' cannot be an empty string. Pin
Richard Deeming28-Oct-15 3:29
mveRichard Deeming28-Oct-15 3:29 
GeneralRe: Error: The parameter 'addresses' cannot be an empty string. Pin
Member 876166728-Oct-15 8:32
Member 876166728-Oct-15 8:32 
Many thanks, Richard, for your reply.

I have done as you suggested and made a couple of other alterations.

The code now looks like this:

<p><asp:Label ID="Email" runat="server" Text="Email"></asp:Label>
<asp:TextBox ID="your_email" runat="server" ></asp:TextBox>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" DisplayMode="SingleParagraph" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ErrorMessage="*" ControlToValidate="your_email" Display="None"

ForeColor="#FF6666"></asp:RequiredFieldValidator> 
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" Display="None" ErrorMessage="Please complete the Email field"
ControlToValidate="your_email"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator></p>


The result is that when I complete the 3 fields correctly, the form is sent.

When I complete the Name and Message fields, and Email field (without the @), I get an on screen error: 'Please complete the Email field' (for some reason it is in a white font and not the red of ="#FF6666"). I will amend that so it reads 'Please enter a valid email address'.

When I leave the email field blank entirely (the form does not get sent, which is fine), but I can see a little asterisk. I presume that asterisk is this:

ErrorMessage="*"


Can I not replace that asterisk with the on screen message: 'Please complete the Email field'?

Thanks again.
GeneralRe: Error: The parameter 'addresses' cannot be an empty string. Pin
Richard Deeming28-Oct-15 8:41
mveRichard Deeming28-Oct-15 8:41 
GeneralRe: Error: The parameter 'addresses' cannot be an empty string. Pin
Member 876166728-Oct-15 9:35
Member 876166728-Oct-15 9:35 
GeneralRe: Error: The parameter 'addresses' cannot be an empty string. Pin
Richard Deeming28-Oct-15 9:42
mveRichard Deeming28-Oct-15 9:42 
GeneralRe: Error: The parameter 'addresses' cannot be an empty string. Pin
Member 876166728-Oct-15 12:15
Member 876166728-Oct-15 12:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.