ASP.NET - server side Email validation in gridview data using C# code

Asked By gowri shankar
04-Feb-12 01:23 AM
Hi ,

   how to create server side Email validation in gridview data using C# code
  dipa ahuja replied to gowri shankar
04-Feb-12 03:21 AM
Try this
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
  <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
    ErrorMessage="Invalid Email addresss" ControlToValidate="TextBox1"
     ValidationExpression="^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$" />
 
Using javascript
 
<script type="text/javascript">
    function checkEmail(email) {
      if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email.value)) {
        return (true)
      }
      alert("Invalid E-mail Address! Please re-enter.")
      return (false)
    }      
</script>
 
<asp:TextBox ID="TextBox2" runat="server" onblur="checkEmail(this)"/>
 
 
Create New Account
help
ASP.NET Data Control Series - Part 2 Part 2 of the ASP.NET Data Control Series continues. In this article, the FormView DataControl is given a closer inspection. ASP.NET 2.0 Data Controls Author: Douglas Minnaar The intent of this series is to provide more information concerning the functionality and limitations of the available ASP.NET 2.0 data controls. This will mostly be demonstrated through the use of code samples
have to follow? Provide brief information with url to download ajax. The CalendarExtender is an ASP.NET AJAX control that is associated with a TextBox control. When the user clicks on the TextBox, a client-side Calendar control pops up. The user can then set a date by clicking on a out some information about it over here . I assume you have some basic experience developing ASP.NET Ajax applications and have installed the ASP.NET Ajax Library and ASP.NET Control Toolkit . As of this writing, the toolkit version is Version 1.0.20229
ASP.NET 4.0 FAQ Part-1 This FAQ is about the new and enhanced features of ASP.NET 4.0 along with other technical details. It discusses all the New features in ASP.NET 4.0 and some of the features of Visual Studio 2010. It can be kept as a handbook for referring new features of ASP.NET 4.0. It is given in simpler manner without digging more into details and hence
I'am i supposed to replace them, like for example what if i want a gridview or an update panel or stuff like that, it means they are not available in components: the model, the view, the controller. If you want something like WebUser control in ASP.NET Web Form Application, I suggest you can create Partial Views. What's more please check this link: http: / / www.mikesdotnetting.com / Article / 105 / ASP.NET-MVC-Partial-Views-and-Strongly-Typed-Custom-ViewModels . In addition, the ASP.NET MVC framework includes helper method that provide an easy way to render HTML in a library / dd410596(v = VS.98).aspx . Let’s go over the points, shall we? First, ASP.NET WebForms: 1 – Familiar control and event base programming model The claim here is that
edit option Check this post. the UI is getting disturbed http: / / www.eggheadcafe.com / community / asp-net / 17 / 10371909 / gridview-sorting-using-jquery.aspx Navigation menu missing in forum merit page http: / / www.eggheadcafe.com 2 Replies MVC and WCF ( 0 views ) Submitted By Ismael on 17-Oct-11 in ASP.NET . 4 Replies How to make GeoFence in google map using c# ( 0 views ) Submitted By balaji mogadali on 17-Oct-11 in ASP.NET . 1 Reply Did Component Art Support Offline Data in mobiles ( 0 views ) Submitted By balaji mogadali on 17-Oct-11 in ASP.NET . it is showing 0 views but the replies are showing as 1 or 4