Click here to Skip to main content
15,892,965 members

how to check validation group

DINESH K MAURYA asked:

Open original thread
how to check validation group ?
i have a form in which 50 textbox whin i click button then this page validate false how to check which textbox is blank in validation group.

Imports Microsoft.VisualBasic
Imports System.Data.SqlClient
Imports .DBUtility
Imports System.Collections.Generic


Public Function getColorCode(ByVal obj As CColorName, ByVal startIndex As Int16, _
                            ByVal endIndex As Int16, ByRef totalRecords As Int16, ByVal TRecords As Boolean, ByVal strCheckColorList As String)As List(Of CColorName)
        Dim objlst As New List(Of CColorName)()
        Dim reader As SqlDataReader
        Try
            If TRecords = True Then
                Dim param As SqlParameter() = New SqlParameter() {New SqlParameter("@ColorID", obj.ColorID), _                                                                                                                                   
                                                                  New SqlParameter("@Color", strCheckColorList) }
                                                           
                reader = SqlHelper.ExecuteReader(SqlHelper.ConnectionStringRage_RMS, Data.CommandType.StoredProcedure, "dbo.vs_Color_SELECT_TR", param)
                If (reader.Read) Then
                    totalRecords = reader(0)
                End If
                Dim sqlParams As SqlParameter() = New SqlParameter() {New SqlParameter("@ColorId", obj.ColorId), _                                                                      
                                                                      New SqlParameter("@Color", strCheckColorList), _                                                                   
                                                                      New SqlParameter("@startIndex", startIndex), _
                                                                      New SqlParameter("@endIndex", IIf(endIndex = 0, Integer.MaxValue, endIndex))}
                reader = SqlHelper.ExecuteReader(SqlHelper.ConnectionStringRage_RMS, Data.CommandType.StoredProcedure, "dbo.vs_Color_SELECT_PAGING", sqlParams)
            Else
                Dim sqlParam As SqlParameter() = New SqlParameter() {New SqlParameter("@ColorID", obj.ColorId), _                                                                  
                                                                      New SqlParameter("@Color", strCheckColorList)}
                reader = SqlHelper.ExecuteReader(SqlHelper.ConnectionStringRage_RMS, Data.CommandType.StoredProcedure, "dbo.vs_Color_SELECT", sqlParam)
            End If
            While reader.Read
                Dim objC As New CColorName
                If Not IsDBNull(reader("CModelID")) Then objC.ModelID = reader("CModelID")
              objlst.Add(objC)
            End While
            Return objlst
        Catch ex As Exception
            Logs.WriteErrorLog("DBColor.vb | getColorCode " + ex.Message)
            Return objlst
        Finally
            objlst = Nothing
            reader = Nothing
        End Try

    End Function
Tags: ASP.NET

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900