0

I am working with ASP page where I receive the values from a stored procedure to variable properly, but I am not sure how to assign values to drop down.

I used the same way for the text box and it works fine.

In code below I am assigning values from data set to variable

cc_db_SiteSurveyOnly=bbInfoRs("SiteSurveyOnly").Value

And here is a code for the the HTML

            <select name="cc_LocalSiteSiteSurveyOnly" VALUE="<%=cc_db_SiteSurveyOnly%>">
               <option value="">Select</option>
               <option value="Y">Y</option>
               <option value="N">N</option>
            </select>

1 Answer 1

1

Look here: https://msdn.microsoft.com/en-us/library/0dzka5sf(v=vs.71).aspx

And populate with DataBinding. Here's a question already answered about that:

Databind a dropdownlist

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.