I have developed a small form with 3 input type = text and one input type = submit button. The end user fills the form and submit it, but no data inserted into backend List. (probably empty form is submitted). I get to know that Javascript is disabled on user's browser. Now i want to do server side validation. How i validate my form on server side? I need a piece of code to validate form on server side (code behinde) ? I need code in asp.net
1 Answer
In your button click method try calling
Page.Validate()
//OR
Page.Validate("[Name of validation group]")
and then:
if(Page.IsValid) {
//Go ahead and submit your data to SharePoint.
}