Introduction: In
this article I have explained how we can create contact us page in Asp,net.
Description:
In the last article I have explained How to integrate Captcha in asp.net, Auto refresh data in Gridview without loading page whole page in asp.net, How to use SiteMapPath Navigation Control in Asp.net, Encrypt and Decrypt Query String in asp.net, Create multiple Language website in Asp.net and HTTP Error 500.21 - Internal Server Error Handler.
In the last article I have explained How to integrate Captcha in asp.net, Auto refresh data in Gridview without loading page whole page in asp.net, How to use SiteMapPath Navigation Control in Asp.net, Encrypt and Decrypt Query String in asp.net, Create multiple Language website in Asp.net and HTTP Error 500.21 - Internal Server Error Handler.
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>