.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

very simple asp:RegularExpressionValidator for Email not working

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :ASP.Net
My implementation is simple. I have a public static variable in a class called EmailHelper containing my regular expression as follows:namespace Base.Core.Utilities { public static class EmailHelper { public const string EMAIL_REGEX = @"^([a-zA-Z0-9]+([\.+_-][a-zA-Z0-9]+)*)@(([a-zA-Z0-9]+((\.|[-]{1,2})[a-zA-Z0-9]+)*)\.[a-zA-Z]{2,6})$"; } } I then have the following web controls on my page:<asp:Panel ID="pnlChangeEmail" runat="server" DefaultButton="btnChangeEmail"> <asp:Label ID="lblChangeEmail" AssociatedControlID="txtEmail" runat="server">New email:</asp:Label> <asp:TextBox ID="txtEmail" runat="server" CssClass="textfield"></asp:TextBox> <asp:LinkButton ID="btnChangeEmail" OnClick="Change_Email" runat="server" ValidationGroup="ChangeEmail" CssClass="btn"> <strong><asp:Literal runat="server" ID="litSubmit" Text='<%$ Resources: GlobalResource, SUBMIT %>' /></strong> </asp:LinkButton> <asp:RequiredFieldValidato

View Complete Post

More Related Resource Links

Email this Post in SharePoint Blog is not working for Lotus Notes 6.5


I have tried "Email this Post" in a SharePoint blog. I got the email as desired, but the doesnot resolve the post.

Here are the link examples:

I got the link in email as mentioned below:


But i should get as below to resolve the link:


Any ideas?


Incomming Email Not Working Correctly in SharePoint 2010

Hello everyone, We recently upgraded from SharePoint 2007 to 2010. Prior to the upgrade I had two SharePoint Document libraries setup to receive incoming emails. We had two reports scheduled in Reporting Services and each report emailed a document library once a week. After the upgrade this stopped working. The reason this stopped working was because the file names of the attachments were the same each week, however in 2007, sharepoint would append a random 4 digits to the end of the file name. Was the removed from 2010 on purpose? After discovering this didn't work, I decided to create a workflow on these lists that anytime and item is added go change the file name to include the list ID to ensure that the file names will be unique. Only to find out that items added to the list from the incomming emails do not trigger the workflow. Doing some research on this and it looks like it was turned into Mircosoft as a bug in 2007 which had a fix, but the fix is only for 2007 is doesn't say it applies to SharePoint 2010 so I don't want to install it. Anyone know if there is a fix for this in SharePoint 2010? Thanks in advance, Matt

Simple test not working

Hi all,  I've created a dummy test that does absolutely nothing. When I try to run it I get the following message: Error TestMethod1 TestProject Unable to get type TestProject.UnitTest1, TestProject. Error: System.BadImageFormatException: Could not load file or assembly 'TestProject, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. ... I compiled with platform set to x64, ma machine is a 64 bits and visual studio is not apparently [is installed in C:\Program Files (x86)]. I don't know exactly what .Net is installed. Struggling to really find out how to check that. Any ideas, Thanx, --mike

<%# eval> not working for a simple property

<form id="form1" runat="server"> <div> <table> <tr> <td>Name: <%#customer%> </td> </tr> </table> </div> </form>        Partial Class ScorePage Inherits System.Web.UI.Page Private _customer As String = "Sachin" Public Property customer() As String Get Return _customer End Get Set(ByVal value As String) _customer = value End Set End Property End Class   The expected result in html page is Name: Sachin But i am getting Name: property is not getting displayed. I thought instead of creating a label control, we can use this method, but it is not working  

Sending email via SmtpClient() not working with smtp.gmail.com :(

Help I cannot seem to send an email via my gmail account using "C#" why not?   <system.net> <mailSettings> <smtp deliveryMethod="Network" from="ian.coetzer@gmail.com"> <network host="smtp.gmail.com" port="587" enableSsl ="true" defaultCredentials ="false" password ="xxxxxx" userName ="ian.coetzer@gmail.com"></network> </smtp> </mailSettings> </system.net> SmtpClient smtpClient = new SmtpClient(); MailMessage message = new MailMessage(); try { message.To.Add(emailTo); message.Subject = ""; message.Body = GetEmailBody(userName, password, url); smtpClient.Send(message); return true; } catch(Exception ex) { throw new ApplicationException("Could not send notification.", ex); }   I.W Coetzer

Link in email message is not working through WebMail

Hi, I have used below link in email message using Start Approval process action in SharePoint 2010, this link highlighting with blue color  when i open Outllok and I am able to click on it as shown below.When i looged in using webmail from outside this link is not highlighting and unable to click on it. http://sharepointdev/CapComApprovalForm/_layouts/WrkTaskIP.aspx?ID=569&List=32db4bbb-cdff-4366-9758-f6ab75300061 Please hep me out to open this link through webmail by clicking on it. Thanks in Advanace. -Bassu

Email alerts no longer working- please help.

Hello- I recently had a problem applying an SSL certificate to my MOSS 2007 site where I had to rebuild a lot things in order to get the site back up and running.  Now that it is, I can no longer get email alerts to the users.  The odd thing is that when I set up a calendar event, only me (the site administrator) receives an automated message from 'Administrator@xyz.com'???  This tells me that the smtp settings are correct.  I have found severl posts about this but they are all from developers who think that everyone knows how to program and so their answers are not step by step for me to at least try them out?  Can someone point me in the right direction? Thanks!

Email Attachements not working in SharePoint 2010


I am having an issue with email attachments in SharePoint 2010 that sounds similar to a SharePoint 2007 discussion thread I found on here.  That threat provided a link for the Feb 2010 CU but that appears to be only for SharePoint 2007. 

Basically, I have a doc library that is enabled to accept incoming messages.  When I enable the option to 'Save Original Message', I get an EML file in the library that does in fact contain the original attachment (.doc, .pdf, .xls, etc...).  If I disable the library option to 'Save Original Message', I get nothing.  No email and no attachment.  I am looking to get just the attachment without the email body as these are usually blank anyway.  

This functionality seems to work for Lists, but not Documenet Libraries.

Any ideas?


James Kendig

SSRS2008 Report email subscription not working

Using our local smtp server i am trying to do a report subscription to mail the report to certain mail ids. In report manager getting the status as 'Mail sent to <>' But originally no mail were sent. what might the problem be?
--------------------------- Radhai Krish | Golden Age is no more far | --------------------------

Simple jQuery inside a ListView ItemTemplate: Only 1st row is working?


Here is my js code:

$(document).ready(function () {

    $("#lnkBlocks").text("Show Blocks");

    //Show course blocks
    $("#lnkBlocks").click(function () {
        if ($("#divBlocks:first").is(":hidden")) {
            $("#lnkBlocks").text("Hide Blocks");
        } else {
            $("#lnkBlocks").text("Show Blocks");


Here is my ListView Item Template:

            <a id="lnkBlocks">Show Blocks</a>
            <asp:Label ID="ShortNameLabel" runat="server" Text='<%# Eval("ShortName") %>' />
            <div id="divBlocks" style="display:none;">This is the blocks box</div>


What is happening here and how do I fix it? I will also be enclosing the ListView inside an UpdatePanel later, after I get this fixed. Thanks.

Email Alert is NOT working for this forum??

Does anyone else experience the same issue?

Working with SharePoint document libraries

Document libraries are collections of files that you can share with team members on a Web based on Microsoft Windows SharePoint Services. For example, you can create a library of common documents for a project, and team members can use their Web browsers to find the files, read them, and make comments. Users with Microsoft Office 2003 can check out and edit the files as if they resided on a local or network drive.

By default, your team Web site comes with a built-in document library named Shared Documents, which is listed on the Quick Launch bar as well as on the Documents and Lists page.

Creating a Simple Class in C#

The second article in the C# Object-Oriented Programming tutorial describes how classes are created in C# and how behaviour, in the form of publicly visible and private, hidden methods can be added. This demonstrates some of the uses of encapsulation

A Simple and Extensible Radio Button Style GridView

The GridView is one of the significant controls in ASP.NET 2.0 and later versions. No doubt it reduces a lot of work time. However, customizing the GridView control is not an easy task. For example, it's hard to add a radio button column to the GridView. This article demonstrates the reason why a radio button column cannot act as normal and how to create a simple and extensible radio button GridView.

Silverlight Simple Animation

Silverlight has several built in techniques for animating controls. Many of these technologies are particularly useful for creating simple animations meant to decorate a web page with eye catching movement that draws the reader's attention. In this post I will skip over these decorative technologies, and instead show how to create a simple animation using a technique similar to those used in many games.

Working with DropDownList and ListBox Controls in ASP.NET

"In my application i am using dropdownlist to display all categories from a table. When the user clicks this control I display all records in that category. Category table also contains column called color.

I wanted display some categories in dropdown list different color and others in different color using ASP.NET."-Anonymous

PrintPocketCE Print Pocket Excel, Pocket Word and email files

Version 3.560 (May 15, 2009):

Important bug fix: a slight difference in how some devices create fonts was causing a few devices to have significantly longer print times for large print jobs.

Adjusted PocketJet printer paper feed commands

Other minor fixes and enhancements.

Version 3.559 (Mar 5, 2009):

Added support for Martel MCP78xx printers

Version 3.558 (Aug 20, 2008):

Added support for Martel MCP78xx printers

Version 3.557 (June 27, 2008):

Fixed error in Canon printer support

Fixed COM0 port selection

Version 3.556 (June 15, 2008):

Added support for Brother MW-260

Added support for Sato MB400

Version 3.555 (Aug 8, 2007):

Added support for Pentax RuggedJet 3 and RuggedJet 4 printers

Changed Epson TM-P60 support to maximum page width of 1200 dots

Version 3.551 (Aug 1, 2006):

Added Peripheral Nomad printer support

Version 3.550 (Mar 23, 2006):

Added Panasonic JT-H200PR printer support

Added Pocket Spectrum printer support

Fixed problem with WM5.0 "inverted image" problem
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend