I am new to Asp.net MVC. How to give validations for my forms.
View Complete Post
I have been using properties and have idea that using properties with private fields we can implement validations and buisness rules in them.
But I am just thinking asp.net client side validation controls provide good strength and they provide good user experience as well. They can be used for any type of validation (using regular expression) on client side and their re-use is possible on server side. When validation controls are a must and they are powerful; is making properties not just wastage of time ?
Is there still some use of properties ? Please guide me.
I have a webform in which i am using Ajax.BeginForm.
But due to this my client side required fields are not working.
To me this should be much easier, but I can't seem to retain the values that are put in the Insert template upon a validation failure or when the sql fails. This will prevent the user from having to retype everything agin in the event of a failure.
As you can see I am using the Sub Insert_Click and not using an insert through the wizard. so the fields are unbound textboxes on the form. There are 2 dropdowns that provide choices for the other fields.
Any help would be appreciated. I pasted in the code using the text only option becuase the format was getting messed up. I porboably need more background on why the fields are blanking out.
See Code below
Protected Sub InsertButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
' Dim sqlparm As String
Dim con As Data.SqlClient.SqlConnection = Nothing
Dim cmd As Data.SqlClient.SqlCommand = Nothing
Dim dr As Data.SqlClient.SqlDataReader = Nothing
Dim sql As String = ""
Dim x As Integer
' Dim x As Integer
If CType(Me.fvwAppSecurityDetails.FindControl("CorpIDTextBox"), TextBox).Text = "" Then
Me.lblMessage.Text = "CorpID cannot be blank"
Else : Page.Session("CorpID&
Any best tutorial for Registration Page With Jquery Validations
I am new to Dot Net and learning with your help.
Recently i saw an advance updatepanel at this link http://solar.coolerplanet.com/RequestInformation.aspx
As far as i know they used the AJAX updatepanel in there form.
Usually updatepanel works with one step... i mean to say one update but there form is based on 5 steps. Each step proceed to next step when the submited information is validated.
Friends can he help me to understand and built something similar?