Current Path : G:/PleskVhosts/mpcdp.in/cmamp.mpcdp.in/cdpp3/ |
Windows NT SG2NWVPWEB022 10.0 build 17763 (Windows Server 2016) i586 |
Current File : G:/PleskVhosts/mpcdp.in/cmamp.mpcdp.in/cdpp3/ve-5D83.tmp |
Imports System.Data Imports System.Data.SqlClient Partial Class CityProfile_New Inherits System.Web.UI.Page ' Dim ObjClassDB As New ClassDB Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load '((MasterPage4.master)Master).hideHeaderExtras(); ' Master.FindControl("DivReg_complete").Visible = true; ' DirectCast(Master, MasterPage4.master).hideHeaderExtras() ' Master.FindControl("cf").Focus() '.Visible = True ' ObjClassDB.ConnectDB() Dim firstN = "" Label1.Visible = False 'If Not Context.User.Identity.IsAuthenticated Then ' Context.Application.Clear() ' Session.Clear() ' Session("dt") = DBNull.Value ' Session.Abandon() ' FormsAuthentication.SignOut() ' Label5.Text = "yes1111" 'Else Dim sobj = Session("myobj") Context.Items("CityProfile_New") = "no" Label4.Text = sobj If sobj <> "" Then Dim userName = Context.Application.AllKeys(0) Dim pageName = Context.Application.AllKeys(1) Label2.Text = userName firstN = Context.Application.AllKeys(2) 'Context.Application.Add(contextFirst, True) Label3.Text = firstN Butt_Update.Visible = True Butt_Cancle.Visible = True enablefalseControl() 'ObjClassDB.ConnectDB() If Page.IsPostBack = False Then ' Call ObjClassDB.FillDropDownList(DDLULBID, "SPGenericSelect", "Viw_I_GetCityCompanywise", "ULBID", "ULBNameEnglish", "where FirstName='" + firstN + "'", "ORDER BY ULBNameEnglish") Dim hRow As Integer = LoadCompany(firstN) If hRow = 1 Then ' Call DataToList(DDLULBID.SelectedValue) DataToList(DDLULBID.SelectedValue) End If If hRow = 1 Then LoadCompany_NEW() DataToList(DDLULBID.SelectedValue) ' Call ObjClassDB.FillDropDownList(DDLULBID, "SPGenericSelect", "MasterULB", "ULBID", "ULBNameE", "", "ORDER BY ULBNameE") ' Call DataToList(DDLULBID.SelectedValue) End If End If End If ' ObjClassDB.ConnectDB() ' If Page.IsPostBack = False And firstN = "" Then If firstN = "" Then If Page.IsPostBack = False Then ' Call ObjClassDB.FillDropDownList(DDLULBID, "SPGenericSelect", "MasterULB", "ULBID", "ULBNameE", "", "ORDER BY ULBNameE") ' Call DataToList(DDLULBID.SelectedValue) Label5.Text = "yes" LoadCompany_NEW() End If End If End If DataToList(DDLULBID.SelectedValue) End Sub ''' <summary> ''' new change for the population ddlulb droupdown ''' </summary> ''' <param name="Parafname"></param> ''' <returns></returns> ''' <remarks></remarks> ''' Function LoadCompany_NEW() As Integer ' DD_CompanyName.Items.Clear() Dim record As Integer Dim sql = "select ulbid,ULBNameE from dbo.MasterULB ORDER BY ULBNameE" Dim command As New Command(sql, False) 'WHERE Login_ID = " & _loginID & " ", False) Try command.ExecuteReader(True, False) If command.Reader.HasRows Then DDLULBID.Items.Clear() DDLULBID.DataValueField = "ulbid" DDLULBID.DataTextField = "ULBNameE" DDLULBID.DataSource = command.Reader DDLULBID.DataBind() If DDLULBID.Items.Count > 0 Then DDLULBID.Items.Insert(0, New ListItem("Select City", "0")) Return record = 1 End If Return record = 2 Else End If Finally command.Close() End Try End Function Function LoadCompany(ByVal Parafname As String) As Integer ' DD_CompanyName.Items.Clear() Dim record As Integer Dim sql = "select ULBNameEnglish,ulbid from dbo.Viw_I_GetCityCompanywise where FirstName= '" + Parafname + "'" Dim command As New Command(sql, False) 'WHERE Login_ID = " & _loginID & " ", False) Try command.ExecuteReader(True, False) If command.Reader.HasRows Then DDLULBID.Items.Clear() DDLULBID.DataValueField = "ulbid" DDLULBID.DataTextField = "ULBNameEnglish" DDLULBID.DataSource = command.Reader DDLULBID.DataBind() If DDLULBID.Items.Count > 0 Then DDLULBID.Items.Insert(0, New ListItem("Select City", "0")) Return record = 1 End If Return record = 2 Else End If Finally command.Close() End Try End Function '' ''Protected Sub GVCP_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles GVCP.PageIndexChanging '' '' GVCP.PageIndex = e.NewPageIndex '' '' Call DataToGrid() '' ''End Sub '' ''Protected Sub GVCP_RowCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVCP.RowCreated '' '' If e.Row.RowType = DataControlRowType.DataRow Then '' '' e.Row.Cells(0).Visible = False '' '' ElseIf e.Row.RowType = DataControlRowType.Header Then '' '' e.Row.Cells(0).Visible = False '' '' ElseIf e.Row.RowType = DataControlRowType.Footer Then '' '' e.Row.Cells(0).Visible = False '' '' End If '' ''End Sub '' ''Protected Sub GVCP_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GVCP.RowCommand '' '' If e.CommandName = "Select" Then '' '' With GVCP '' '' Response.Redirect("CDPSynopsis.aspx?mID=" & Trim(.Rows(e.CommandArgument).Cells(0).Text)) '' '' End With '' '' End If '' ''End Sub Private Sub DataToGrid() '' ''Dim DS As New DataSet '' ''Dim ObjReturnValue As New ClassReturnValueSelectToGrid '' ''Dim mSPName As String = "" '' ''Dim mTableName As String = "" '' ''Dim mFieldName As String = "" '' ''Dim mWhereClause As String = "" '' ''Dim mOrderByClause As String = "" '' ''Dim mTexttoSearch As String = "" '' ''mWhereClause = "" '' ''mSPName = "SPGenericSelect" '' ''mTableName = "ViewTransCityProfile" '' ''If Session("MyCulture") = "en" Then '' '' mFieldName = "ULBID, ULBNameE AS ULBName, CompanyNameE AS CompanyName, " '' '' mOrderByClause = "" '' ''ElseIf Session("MyCulture") = "hi" Then '' '' mFieldName = "ULBID, CompanyNameH AS CompanyName, DivisionNameH AS DivisionName, ZilaNameH AS ZilaName, ULBNameH AS ULBName" '' '' mOrderByClause = "ORDER BY CompanyNameH, DivisionNameH, ZilaNameH, ULBNameH" '' ''Else '' '' mFieldName = "ULBID, CompanyNameE AS CompanyName, DivisionNameE AS DivisionName, ZilaNameE AS ZilaName, ULBNameE AS ULBName" '' '' mOrderByClause = "ORDER BY CompanyNameE, DivisionNameE, ZilaNameE, ULBNameE" '' ''End If '' ''ObjReturnValue = ObjClassDB.ExecuteSelectToGridSP(mSPName, mTableName, mFieldName, mWhereClause, mOrderByClause) '' ''DS = ObjReturnValue.Dataset '' ''GVCP.DataSource = DS.Tables(mTableName).DefaultView '' ''GVCP.DataBind() End Sub Private Sub enablefalseControl() TextBox_AverageAnnualRainfall.ReadOnly = False TextBox_DateOfConstitution.ReadOnly = False TextBox_HeightAboveSeaLevel.ReadOnly = False TextBox_HistoricImportance.ReadOnly = False TextBox_LandUseAgriculture.ReadOnly = False TextBox_LandUseAgriculturePercent.ReadOnly = False TextBox_LandUseAgricultureUDPFI.ReadOnly = False TextBox_LandUseCommercial.ReadOnly = False TextBox_LandUseCommercialPercent.ReadOnly = False TextBox_LandUseCommercialUDPFI.ReadOnly = False TextBox_LandUseGreenArea.ReadOnly = False TextBox_LandUseGreenAreaPercent.ReadOnly = False TextBox_LandUseGreenAreaUDPFI.ReadOnly = False TextBox_LandUseIndustrial.ReadOnly = False TextBox_LandUseIndustrialPercent.ReadOnly = False TextBox_LandUseIndustrialUDPFI.ReadOnly = False TextBox_LandUsePublic.ReadOnly = False TextBox_LandUsePublicPercent.ReadOnly = False TextBox_LandUsePublicUDPFI.ReadOnly = False TextBox_LandUseResidential.ReadOnly = False TextBox_LandUseResidentialPercent.ReadOnly = False TextBox_LandUseResidentialUDPFI.ReadOnly = False TextBox_LandUseRoads.ReadOnly = False TextBox_LandUseRoadsPercent.ReadOnly = False TextBox_LandUseRoadsUDPFI.ReadOnly = False TextBox_LandUseSensitive.ReadOnly = False TextBox_LandUseSensitivePercent.ReadOnly = False TextBox_LandUseSensitiveUDPFI.ReadOnly = False TextBox_LandUseWaterbodies.ReadOnly = False TextBox_LandUseWaterbodiesPercent.ReadOnly = False TextBox_LandUseWaterbodiesUDPFI.ReadOnly = False TextBox_Latitude.ReadOnly = False TextBox_Longitude.ReadOnly = False TextBox_MunicipalArea1991.ReadOnly = False TextBox_MunicipalArea2001.ReadOnly = False TextBox_MunicipalArea2011.ReadOnly = False TextBox_Population1981.ReadOnly = False TextBox_Population1991.ReadOnly = False TextBox_Population2011.ReadOnly = False TextBox_Population2001.ReadOnly = False TextBox_PopulationProjectionMethod.ReadOnly = False TextBox_ProjectedPopulation2015.ReadOnly = False TextBox_ProjectedPopulation2025.ReadOnly = False TextBox_ProjectedPopulation2035.ReadOnly = False TextBox_ULBName.ReadOnly = False TextBox_CompanyName.ReadOnly = False End Sub Private Sub DataToList(ByVal mID As String) Dim dsAdmin As New Data.DataSet() Dim dt As New Data.DataTable() Global.Command.CreateSqlConnection() Dim sqlS = "select * from CityProfileXLS where ULBID= '" + mID + "'" Dim da As New Data.SqlClient.SqlDataAdapter(sqlS, Global.Command.CreateSqlConnection()) ' DataTable dt = new DataTable(); da.Fill(dsAdmin, "dtData") Dim myDataTable As Data.DataTable = dsAdmin.Tables(0) ' If myDataTable.Rows.Count > 0 Then ' 'Session("dt1") = myDataTable ' 'GVULB.DataSource = myDataTable ' 'GVULB.DataBind() ' 'GVULB.EnableViewState = False 'End If 'da.Dispose() 'myDataTable.Dispose() 'Return myDataTable '-------------------------------- 'Dim DS As New DataSet '' Dim sqlS = "select * from CityProfileXLS where ULBID= " + mID + " " 'DS = ObjClassDB.ASlumgride(sqlS) 'Dim myDataTable As Data.DataTable = DS.Tables(0) Label1.Visible = False For Each dRow As Data.DataRow In myDataTable.Rows TextBox_AverageAnnualRainfall.Text = dRow("AverageAnnualRainfall").ToString() TextBox_DateOfConstitution.Text = dRow("DateOfConstitution").ToString() TextBox_HeightAboveSeaLevel.Text = dRow("HeightAboveSeaLevel").ToString() TextBox_HistoricImportance.Text = dRow("HistoricImportance").ToString() TextBox_LandUseAgriculture.Text = dRow("LandUseAgriculture").ToString() TextBox_LandUseAgriculturePercent.Text = dRow("LandUseAgriculturePercent").ToString() TextBox_LandUseAgricultureUDPFI.Text = dRow("LandUseAgricultureUDPFI").ToString() TextBox_LandUseCommercial.Text = dRow("LandUseCommercial").ToString() TextBox_LandUseCommercialPercent.Text = dRow("LandUseCommercialPercent").ToString() TextBox_LandUseCommercialUDPFI.Text = dRow("LandUseCommercialUDPFI").ToString() TextBox_LandUseGreenArea.Text = dRow("LandUseGreenArea").ToString() TextBox_LandUseGreenAreaPercent.Text = dRow("LandUseGreenAreaPercent").ToString() TextBox_LandUseGreenAreaUDPFI.Text = dRow("LandUseGreenAreaUDPFI").ToString() TextBox_LandUseIndustrial.Text = dRow("LandUseIndustrial").ToString() TextBox_LandUseIndustrialPercent.Text = dRow("LandUseIndustrialPercent").ToString() TextBox_LandUseIndustrialUDPFI.Text = dRow("LandUseIndustrialUDPFI").ToString() TextBox_LandUsePublic.Text = dRow("LandUsePublic").ToString() TextBox_LandUsePublicPercent.Text = dRow("LandUsePublicPercent").ToString() TextBox_LandUsePublicUDPFI.Text = dRow("LandUsePublicUDPFI").ToString() TextBox_LandUseResidential.Text = dRow("LandUseResidential").ToString() TextBox_LandUseResidentialPercent.Text = dRow("LandUseResidentialPercent").ToString() TextBox_LandUseResidentialUDPFI.Text = dRow("LandUseResidentialUDPFI").ToString() TextBox_LandUseRoads.Text = dRow("LandUseRoads").ToString() TextBox_LandUseRoadsPercent.Text = dRow("LandUseRoadsPercent").ToString() TextBox_LandUseRoadsUDPFI.Text = dRow("LandUseRoadsUDPFI").ToString() TextBox_LandUseSensitive.Text = dRow("LandUseSensitive").ToString() TextBox_LandUseSensitivePercent.Text = dRow("LandUseSensitivePercent").ToString() TextBox_LandUseSensitiveUDPFI.Text = dRow("LandUseSensitiveUDPFI").ToString() TextBox_LandUseWaterbodies.Text = dRow("LandUseWaterbodies").ToString() TextBox_LandUseWaterbodiesPercent.Text = dRow("LandUseWaterbodiesPercent").ToString() TextBox_LandUseWaterbodiesUDPFI.Text = dRow("LandUseWaterbodiesUDPFI").ToString() TextBox_Latitude.Text = dRow("GeographicalLocationLatitude").ToString() TextBox_Longitude.Text = dRow("GeographicalLocationLongitude").ToString() TextBox_MunicipalArea1991.Text = dRow("MunicipalArea1991").ToString() TextBox_MunicipalArea2001.Text = dRow("MunicipalArea2001").ToString() TextBox_MunicipalArea2011.Text = dRow("MunicipalArea2011").ToString() TextBox_Population1981.Text = dRow("Population1981").ToString() TextBox_Population1991.Text = dRow("Population1991").ToString() TextBox_Population2011.Text = dRow("Population2011").ToString() TextBox_Population2001.Text = dRow("Population2001").ToString() TextBox_PopulationProjectionMethod.Text = dRow("PopulationProjectionMethod ").ToString() TextBox_ProjectedPopulation2015.Text = dRow("ProjectedPopulation2015").ToString() TextBox_ProjectedPopulation2025.Text = dRow("ProjectedPopulation2025").ToString() TextBox_ProjectedPopulation2035.Text = dRow("ProjectedPopulation2035").ToString() TextBox_ULBName.Text = dRow("ULBNameEnglish").ToString() TextBox_CompanyName.Text = dRow("CompanyName").ToString() Next dsAdmin.Dispose() myDataTable.Dispose() 'dlData.DataSource = myDataTable 'dlData.DataBind() End Sub 'Private Sub DataToList1(ByVal mID As String) ' Dim DS As New DataSet ' Dim Datatable As New DataTable ' Dim ObjReturnValue As New ClassReturnValueSelectToGrid ' Dim mSPName As String = "" ' Dim mTableName As String = "" ' Dim mFieldName As String = "" ' Dim mWhereClause As String = "" ' Dim mOrderByClause As String = "" ' Dim mTexttoSearch As String = "" ' mWhereClause = "WHERE ULBID = '" & mID & "'" ' mSPName = "SPGenericSelect" ' mTableName = "ViewTransCityProfile" ' If Session("MyCulture") = "en" Then ' mFieldName = "ULBID, ULBNameE AS ULBName, CompanyNameE AS CompanyName " ' ElseIf Session("MyCulture") = "hi" Then ' mFieldName = "ULBID " ' Else ' mFieldName = "ULBID, ULBNameE AS ULBName, CompanyNameE AS CompanyName, GeographicalLocationLatitude, " & _ ' "GeographicalLocationLongitude, AverageAnnualRainfall, HeightAboveSeaLevel, MunicipalArea1991, " & _ ' "MunicipalArea2001, MunicipalArea2011, DateOfConstitution, HistoricImportance, CAST(Population1981 AS decimal(18, 0)) AS Population1981, " & _ ' "CAST(Population1991 AS decimal(18, 0)) AS Population1991, CAST(Population2001 AS decimal(18, 0)) AS Population2001, CAST(Population2011 AS decimal(18, 0)) AS Population2011, PopulationProjectionMethod, CAST(ProjectedPopulation2015 AS decimal(18, 0)) AS ProjectedPopulation2015, " & _ ' "CAST(ProjectedPopulation2025 AS decimal(18, 0)) AS ProjectedPopulation2025, CAST(ProjectedPopulation2035 AS decimal(18, 0)) AS ProjectedPopulation2035, " & _ ' "LandUseResidentialUDPFI, LandUseResidential, LandUseResidentialPercent, LandUseCommercialUDPFI, LandUseCommercial, " & _ ' "LandUseCommercialPercent, LandUsePublicUDPFI, LandUsePublic, LandUsePublicPercent, LandUseAgricultureUDPFI, LandUseAgriculture, " & _ ' "LandUseAgriculturePercent, LandUseIndustrialUDPFI, LandUseIndustrial, LandUseIndustrialPercent, LandUseRoadsUDPFI, LandUseRoads, " & _ ' "LandUseRoadsPercent, LandUseGreenAreaUDPFI, LandUseGreenArea, LandUseGreenAreaPercent, LandUseSensitiveUDPFI, LandUseSensitive, " & _ ' "LandUseSensitivePercent, LandUseWaterbodiesUDPFI, LandUseWaterbodies, LandUseWaterbodiesPercent, LandUseTotalUDPFI, LandUseTotal, " & _ ' "LandUseTotalPercent " ' End If ' mOrderByClause = "" ' ObjReturnValue = ObjClassDB.ExecuteSelectToGridSP(mSPName, mTableName, mFieldName, mWhereClause, mOrderByClause) ' DS = ObjReturnValue.Dataset ' ' DLCP.DataSource = DS.Tables(mTableName).DefaultView ' ' DLCP.DataBind() 'End Sub Protected Sub Butt_Update_Click(ByVal sender As Object, ByVal e As System.EventArgs) Dim DBL As New DBL("sp_InsertCDPInformation_II", True) DBL.Parameters.AddWithValue("ulbid", DDLULBID.SelectedValue) DBL.Parameters.AddWithValue("GeographicalLocationLatitude", TextBox_Latitude.Text) DBL.Parameters.AddWithValue("GeographicalLocationLongitude", TextBox_Longitude.Text) DBL.Parameters.AddWithValue("AverageAnnualRainfall", TextBox_AverageAnnualRainfall.Text) DBL.Parameters.AddWithValue("HeightAboveSeaLevel", TextBox_HeightAboveSeaLevel.Text) DBL.Parameters.AddWithValue("MunicipalArea1991", TextBox_MunicipalArea1991.Text) DBL.Parameters.AddWithValue("MunicipalArea2001", TextBox_MunicipalArea2001.Text) DBL.Parameters.AddWithValue("MunicipalArea2011", TextBox_MunicipalArea2011.Text) DBL.Parameters.AddWithValue("DateOfConstitution", TextBox_DateOfConstitution.Text) DBL.Parameters.AddWithValue("HistoricImportance", TextBox_HistoricImportance.Text) DBL.Parameters.AddWithValue("Population1981", TextBox_Population1981.Text) DBL.Parameters.AddWithValue("Population1991", TextBox_Population1991.Text) DBL.Parameters.AddWithValue("Population2011", TextBox_Population2011.Text) DBL.Parameters.AddWithValue("Population2001", TextBox_Population2001.Text) DBL.Parameters.AddWithValue("PopulationProjectionMethod ", TextBox_PopulationProjectionMethod.Text) DBL.Parameters.AddWithValue("ProjectedPopulation2015", TextBox_ProjectedPopulation2015.Text) DBL.Parameters.AddWithValue("ProjectedPopulation2025", TextBox_ProjectedPopulation2025.Text) DBL.Parameters.AddWithValue("ProjectedPopulation2035", TextBox_ProjectedPopulation2035.Text) DBL.Parameters.AddWithValue("LandUseResidentialUDPFI", TextBox_LandUseResidentialUDPFI.Text) DBL.Parameters.AddWithValue("LandUseCommercialUDPFI", TextBox_LandUseCommercialUDPFI.Text) DBL.Parameters.AddWithValue("LandUsePublicUDPFI", TextBox_LandUsePublicUDPFI.Text) DBL.Parameters.AddWithValue("LandUseAgricultureUDPFI", TextBox_LandUseAgricultureUDPFI.Text) DBL.Parameters.AddWithValue("LandUseIndustrialUDPFI", TextBox_LandUseIndustrialUDPFI.Text) DBL.Parameters.AddWithValue("LandUseRoadsUDPFI", TextBox_LandUseRoadsUDPFI.Text) DBL.Parameters.AddWithValue("LandUseGreenAreaUDPFI", TextBox_LandUseGreenAreaUDPFI.Text) DBL.Parameters.AddWithValue("LandUseSensitiveUDPFI", TextBox_LandUseSensitiveUDPFI.Text) DBL.Parameters.AddWithValue("LandUseWaterbodiesUDPFI", TextBox_LandUseWaterbodiesUDPFI.Text) DBL.Parameters.AddWithValue("LandUseResidential", TextBox_LandUseResidential.Text) DBL.Parameters.AddWithValue("LandUseCommercial", TextBox_LandUseCommercial.Text) DBL.Parameters.AddWithValue("LandUsePublic", TextBox_LandUsePublic.Text) DBL.Parameters.AddWithValue("LandUseAgriculture", TextBox_LandUseAgriculture.Text) DBL.Parameters.AddWithValue("LandUseIndustrial", TextBox_LandUseIndustrial.Text) DBL.Parameters.AddWithValue("LandUseRoads", TextBox_LandUseRoads.Text) DBL.Parameters.AddWithValue("LandUseGreenArea", TextBox_LandUseGreenArea.Text) DBL.Parameters.AddWithValue("LandUseSensitive", TextBox_LandUseSensitive.Text) DBL.Parameters.AddWithValue("LandUseWaterbodies", TextBox_LandUseWaterbodies.Text) DBL.Parameters.AddWithValue("LandUseResidentialPercent", TextBox_LandUseResidentialPercent.Text) DBL.Parameters.AddWithValue("LandUseCommercialPercent", TextBox_LandUseCommercialPercent.Text) DBL.Parameters.AddWithValue("LandUsePublicPercent", TextBox_LandUsePublicPercent.Text) DBL.Parameters.AddWithValue("LandUseAgriculturePercent", TextBox_LandUseAgriculturePercent.Text) DBL.Parameters.AddWithValue("LandUseIndustrialPercent", TextBox_LandUseIndustrialPercent.Text) DBL.Parameters.AddWithValue("LandUseRoadsPercent", TextBox_LandUseRoadsPercent.Text) DBL.Parameters.AddWithValue("LandUseGreenAreaPercent", TextBox_LandUseGreenAreaPercent.Text) DBL.Parameters.AddWithValue("LandUseSensitivePercent", TextBox_LandUseSensitivePercent.Text) DBL.Parameters.AddWithValue("LandUseWaterbodiesPercent", TextBox_LandUseWaterbodiesPercent.Text) DBL.ExecuteNonQuery() Label1.Visible = True Label1.Text = "Record success Save.." ' For value As Integer = 10000 To 0 ' Console.WriteLine(value) 'Next ' Label1.Visible = False End Sub Protected Sub Butt_Cancle_Click(ByVal sender As Object, ByVal e As System.EventArgs) Call DataToList(DDLULBID.SelectedValue) Label1.Visible = False End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click 'For Each c As Control In UPGVMover1.Controls ' If TypeOf c Is TextBox Then ' CType(c, TextBox).Enabled = True ' End If 'Next '---------- Dim subctrl As Control For Each c As Control In GIDC.Controls For Each ctrl As Control In c.Controls ' If TypeOf ctrl Is TextBox Then If ctrl.Controls.Count >= 3 Then If ctrl.Controls.Item(1).ID.Split("_")(0).ToString() = "TextBox" Then CType(ctrl, TextBox).Enabled = False End If End If ' If (ctrl.Controls(1).ID.Split("_") (0).ToString() == "TextBox") Then 'If ' End If Next Next 'For Each subctrl In UPGVMover1.Controls ' If subctrl.GetType.ToString = "System.Web.UI.WebControls.TextBox" Then ' subctrl.EnableTheming = False ' End If 'Next End Sub Protected Sub DDLULBID_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DDLULBID.SelectedIndexChanged DataToList(DDLULBID.SelectedValue) Label1.Visible = False End Sub End Class