Click here to Skip to main content
11,636,778 members (77,833 online)
Rate this: bad
good
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
good
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>

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;
          smtp.Send(message);
          Response.Write("<script type='text/javascript'>");
          Response.Write("alert('Thanks for feedback.');");          
          Response.Write("</script>");
}
  Permalink  
v4

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

  Print Answers RSS
0 jyo.net 263
1 stibee 249
2 Sergey Alexandrovich Kryukov 229
3 Suvendu Shekhar Giri 225
4 OriginalGriff 183
0 OriginalGriff 8,941
1 Sergey Alexandrovich Kryukov 8,493
2 Mika Wendelius 6,909
3 F-ES Sitecore 2,388
4 Suvendu Shekhar Giri 2,320


Advertise | Privacy | Mobile
Web04 | 2.8.150728.1 | Last Updated 2 May 2013
Copyright © CodeProject, 1999-2015
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