Print Page | Close Window

Editing a Drop down value

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=15269
Printed Date: 28 March 2026 at 7:15am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Editing a Drop down value
Posted By: Misty
Subject: Editing a Drop down value
Date Posted: 28 May 2005 at 3:21pm
I need help with my code for editing a drop down value in ASP.Net. I am having some problems. I am not getting an error message. It will show all of the options. It will show the selected value. But it won't let me edit it correctly. When I edit it, it gives a random ClientID instead of the correct ClientID. I am not sure what's wrong.
Can someone please look at my code especially the bolded parts to see what might be wrong?
 
Here's my code:

 

        '------------------------------------------------------------

        ' name: DisplayAsString( _objFieldValue as object) As String

        '------------------------------------------------------------

        Function DisplayAsString( _objFieldValue as object) As String

 

                dim strDisplay as String

 

                if _objFieldValue Is System.DBNull.Value then

                &nbs p;       strDisplay = String.Empty

                else

                &nbs p;       strDisplay = _objFieldValue.ToString()

                end if

 

                return strDisplay

 

        End Function

       

        '----------------------------------------------------------------

        ' name: BindDropDownList()

        '----------------------------------------------------------------

        Sub BindDropDownList( _strDomID as String )

       

        Dim BusinessNameValue As String

  

   

    Dim strSQL as String

    Dim strConnect As String   

    Dim conClient As SqlConnection

    Dim cmdSelect As New System.Data.SqlClient.SQLCommand

    Dim dtrClient As SqlDataReader

   

    'Get connection string from Web.Config




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net