Try our conversational search powered by Generative AI!

How to retrieve specific form submission data??


Hi Guys,

    I created Registration and contactus form,both forms data saved in tblBigTable.Now i want to retrieve only registration form data,but my logic will retriev all the forms  data,here is the code.


public class LoadformdataController : PageController
 List submittedData;
 private Injected _formRepository;
 DataTable dt = new DataTable();
 public ActionResult Index(Loadformdata currentPage)
   DataTable dt = new DataTable();
   dt.Columns.Add("Name", typeof(string));
   dt.Columns.Add("Number", typeof(string));
   dt.Columns.Add("Mail", typeof(string));
   dt.Columns.Add("Gender", typeof(string));
   FormDataRepository _formDataRepository = new FormDataRepository();
   var formsInfo = _formRepository.Service.GetFormsInfo(null);
foreach (var info in formsInfo)
  submittedData = _formDataRepository.GetSubmissionData(
  new FormIdentity(info.FormGuid,currentPage.Language.Name),

  List li = new List();
  return View(currentPage);

The above code retriev all forms data,Can anyone help me out of this.



Jan 29, 2018 10:07

If you ONLY want to have 1 form data, you need filter formInfo. Example:

formsInfo = formsInfo.Where(f =>f.Name.Equals("ContactUs"))

Then call  _formDataRepository.GetSubmissionData to get its data.

Jan 29, 2018 11:03

Thank You,Dac Thach Nguyen

Jan 30, 2018 6:50
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.