Tuesday, October 29, 2013

How to create Contact Us page in Asp.net

Introduction: In this article I have explained how we can create contact us page in Asp,net.
Contact Us

Contact us page is a major part of websites through which users send comments, queries feedback etc. of website to admin/website owner.

Add a new webform to website. Drag and drop the Textbox, button, validation controls from Toolbox and desgin the .aspx page as shown below:
<table align="center">
    <tr><td><h1>Contact Us</h1></td><td></td></tr>
    <tr><td>Name:</td><td><asp:TextBox ID="txtname" runat="server"></asp:TextBox><asp:RequiredFieldValidator ID="rfvName" runat="server"
                                        ControlToValidate="txtname" Display="None"
                                        ErrorMessage="Enter Name" EnableTheming="True"></asp:RequiredFieldValidator></td></tr>
     <tr><td>Email:</td><td><asp:TextBox ID="txtemail" runat="server"></asp:TextBox><asp:RequiredFieldValidator ID="rfvrequireemail" runat="server"
                                        ControlToValidate="txtemail" Display="None"
                                        ErrorMessage="Enter Email" EnableTheming="True"></asp:RequiredFieldValidator>
         <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
             ControlToValidate="txtemail" ErrorMessage="Enter Valid Email"
             ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
         </td></tr>

Monday, October 14, 2013

How to integrate Captcha in asp.net

Introduction: In this article I have explained how we can integrate Captcha in asp.net.
Captcha

Captcha is mostly used in Sign up and contact us form. I use the Recaptcha library. You can download the Recaptcha library from given link:
After download the Recapctha library extract it. You see the option dll for 4.0 or 4.5 frameworks. Take new website, right click on your website and choose Add Reference as shown in snapshot: 
Captcha

Now click on browse and select the Recaptcha.web.dll. 
Captcha

You can also add the Captcha control to Toolbox. To use Captcha control you need a public and private key. To get the key go to below given link:

Saturday, October 12, 2013

Noble Prize 2013

Noble Prize in Physics:
The noble prize in physics was awarded jointly to Francois Englert of Belgium and Peter W. Higgs of England. Prize was awarded for their theory of how subatomic particles acquire their mass “for the theoretical discovery of a mechanism that contributes to our understanding of the origin of mass of subatomic particles, and which recently was confirmed through the discovery of the predicted fundamental particle, by the ATLAS and CMS experiments at CERN's Large Hadron Collider”.

Noble prize in Chemistry:
The noble prize in Chemistry was awarded jointly to three U.S. based Martin Karplus, Michael Levitt and Arieh Warshel. Prize was given for developing multiscale models for chemical systems. This model predicts the complex chemical reactions and that can be used for many purposes.

Thursday, October 10, 2013

HTTP Error 500.21 - Internal Server Error Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

Introduction: In this post I will explain how we can sort out the “HTTP Error 500.21 - Internal Server Error Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list” error when we run the website on IIS.

To sort out this error Go to Start menu >> All programs >> Accessories >> Right click on Command Prompt >> Run as Administration and type below given command:

          %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe –i

Is it helpful?

If yes post your comment to admire my work. You can like me on Facebook, Google+, Linkedin and Twitter via hit on Follow us Button and also can get update follow by Email.