Asp.net form validation with angularjs

Feb 5 2019 6:17 AM
Hy guys can anyone tell how to do form validation with angularjs in asp.net (.aspx page Not MVC)
 
Here is my code
 
<div class="form-group col-md-6">
<label for="txtLanguage" data-ng-class="{ 'text-danger' : frmLanguage.LanguageName.$invalid && !frmLanguage.LanguageName.$pristine || frmLanguage.LanguageName.$error.minlength,'text-success':!frmLanguage.LanguageName.$pristine}">Language name</label>
<input type="text" class="form-control" id="txtLanguage" name="LanguageName" data-ng-class="{ 'is-invalid' : frmLanguage.LanguageName.$invalid && !frmLanguage.LanguageName.$pristine,'is-valid' : !frmLanguage.LanguageName.$pristine }" data-ng-model="LanguageName" placeholder="Language" required runat="server" />
<p data-ng-show="frmLanguage.LanguageName.$invalid && !frmLanguage.LanguageName.$pristine && !frmLanguage.LanguageName.$error.minlength" class="invalid-feedback"><i class="fa fa-meh-o" aria-hidden="true"></i>Language is required!</p>
</div>
 
if i remove runat="server" from the textbox then my angularjs code is running .
 
i want to use
 
runat="server"
 
and angularjs bouth from form validation , can any one tell is it possible or not.
 
if possible how to do this? 

Answers (4)