Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loop through and deleted a list from DD

Status
Not open for further replies.

mchoudhury

Programmer
Nov 26, 2004
71
GB
Hi guys,
I have this page where when loaded in a textbox it shows a coulumn from the DB. I also have a drop down list, where all the values of that column are listed. What i want is if a value is texted on the textbox then that value should not be listed on the dropdown list Thios should be assumed by the id field.
At present i looping around the coulumn but it still lists the values on the DD when its already texted on the textbox.

Protected ReadOnly Property PageID() As Long
Get
If IsNumeric(Request.QueryString("stp")) Then Return Request.QueryString("stp")
Return 0
End Get
End Property

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
ParentID.DataSource = FRI.SOMB.Visitor.DataProvider.getStaticPagesList
ParentID.DataBind()


Dim i As Object
For i = 0 To ParentID.Items.Count - 1
If ParentID.Items(i).Selected Then
STP.PageID = ParentID.Items(i).Value

End If

Next i


STP = DataProvider.getStaticPages(PageID)

If Not IsPostBack Then


With STP
reference.Text = .Reference
End If
Does anyone have any idea how would show the DD not to list a value if its texted on the textbox using the PageID field. if refrence value is texted on textbox, then that value should not be listed on the dropdown list.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top