We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Input Form Example

Thread ID:

Created:

Updated:

Platform:

Replies:

131989 Aug 7,2017 02:52 PM UTC Aug 8,2017 02:04 PM UTC ASP.NET Core 2
loading
Tags: General
Greg Gum
Asked On August 7, 2017 02:52 PM UTC

I am trying to get started with Syncfusion for AspNetCore 1.1.

I have created the test application in VS 2017.

Now I want to create a simple input form and connect it to my database. For example, The database has one table called Contacts, with a FirstName and LastName fields.

How do I create a form with a button that will perform validation (firstname and lastname are required) and then save to database?

I don't need a list or a grid, just a simple input form.

I don't see a way to do this with the DataManager. 



Greg Gum
Replied On August 7, 2017 07:37 PM UTC

I ended up doing it with tag helpers like this:


<form asp-controller="Data" asp-action="Save" method="post">
    <label asp-for="firstName"></label><input asp-for="firstName" />


    <label asp-for="lastName"></label>
    <input asp-for="lastName" />

    

    <button type="submit">Save</button>


    <div asp-validation-summary="All"></div>

</form>


Berly Christopher [Syncfusion]
Replied On August 8, 2017 02:04 PM UTC

Hi Greg, 
Thanks for contacting Syncfusion support. 
We are happy to hear that the issue is resolved at your end. Please get back to us if you need any further assistance. 
Regards, 
Berly B.C 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;