Click here to Skip to main content
13,152,454 members (36,962 online)
Rate this:
Please Sign up or sign in to vote.
I want to design a ASP.Net form for feedback/Complaint page.
My requirement is:
* There sholud be two radio buttons on the top of the page.(1 is for old Complaints and another is for new complaint.)
* When user clicks on old complaints then a textbox will be displayed and asking for "Your Complaint ID". When user enters the complaint ID and submits then the details of the complaint is shown.
* When user clicks on new Complaint then fields for Name,Roll Number and email with Subject and message are shown. When user will submit the form it will show a confirmation that thank you for feedback and a mail should go to the user that your feedback/Complaint ID is "complaintid".
* All data should store in database and retrieve also from database.

Please help me out i am unable to do the automatic ID generation part while submitting and the email part.
Thank You.
Posted 1-May-13 20:11pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

-Have multiview control in your page with two views.Change the view according to selected value of the Radiobutton.
-When you select NEW COMPLAINT,then your second view will be displayed as below.

<asp:multiview id="MultiView1" runat="server" xmlns:asp="#unknown">
                <asp:view id="View1" runat="server">
                /*old complaint section*/
                <asp:view id="View2" runat="server">
                             Roll No.

on click event of the button.

string code1 = Guid.NewGuid().ToString();/*you can generate random numbers with other methods also*/
using (MailMessage message = new MailMessage())
          message.IsBodyHtml = true;
          message.From = new MailAddress(from which you want to send mail);
          message.To.Add(new MailAddress(to which you want to send mail));
          message.Subject = subject here;
          message.Body =body text here;
          SmtpClient smtp = new SmtpClient();
          smtp.Host = "host";
          smtp.Credentials = new System.Net.NetworkCredential(username, password);/*you can also define this in web config file*/
          smtp.EnableSsl = false;
          Response.Write("<script type='text/javascript'>");
          Response.Write("alert('Thanks for feedback.');");          

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170924.2 | Last Updated 2 May 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100