Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Dora Medina   on Jul 01 In Asp.net Category.

  
Question Answered By: Calandre Bernard   on Jul 01

Basically for isolation purposes you cannot talk directly to objects inside the .ascx

Look at:
http://www.learnasp.com/students/charlescarroll/sourcecode-searcheruc.aspx
and see the way that we grab the selected item  from the listbox


public choice as string

Sub Page_Load(S As Object, E As EventArgs)
If ispostback=false THEN
....
ELSE
choice=thelist.selecteditem.text
END IF
End Sub

Then in our code for example we can refer to cy.choice for example to get the selected item for cy
and zp.choice to get the selected item fro zp.

Share: 

 
 
Didn't find what you were looking for? Find more on Accessing .ascx elements in .ASPX pages Or get search suggestion and latest updates.


Tagged: