Last post Apr 26, 2018 05:35 AM by vijaylakshmi
Apr 26, 2018 04:32 AM|vijaylakshmi|LINK
I am new to web programming using dotnet, so please dont mind me asking this.
I have a form with 3-4 textfields which have to be filled in.
I want to write field validations in front end using JQuery.
Once all the data entered is ok then , i want to take the entered data backend to be able to write a sql query and use the data for further calculations.
So instead of writing a server end code for validations, can jquery help in validating the data in front end and then take the parameters backend.
Will this idea work.. Is it correct to think that, this idea or method will decrease the server end code or postbacks everytime and saving server time.
Can you please tell, if what i am thinking is correct.
I am not looking for any code, as of now.. just a clarification on whether my thinking process is correct.
Apr 26, 2018 05:31 AM|Khuram.Shahzad|LINK
Generally there are two type of validation we need to perform
Server side is validation is performed on server side language like ASP.Net C# , PHP etc
As far as request to save data is concerned you can make a direct request to Code behined (Web Form), Controller Action (MVC) directly by posting a form
Other way is you can make ajax request and post it.
In your case you can validate for using client side validation and then make a form get/post request to server by passing data as parameter.
Then you can make ADO.Net or any ORM like entity frame work, dapper to save data in database.
Apr 26, 2018 05:35 AM|vijaylakshmi|LINK
Yes.. Thank you.. So what i was thinking was right..