Hi frds,

I have a page which contains the reference of another page ..
<%@ Reference Page="../example.aspx" %>

A listbox is there in the example.aspx. I want to call a javascript function, for eg,
listbox1.Attributes.Add("onClick", "alert('hi');")
that will be shown in main page.

Plz help me to find the solution.

Recommended Answers

All 2 Replies

can you tell it a little bit more organized please?

You would add the attributes on the Page_Load where your referenced page is already compiled.

Or you can put it at PreRender, as that is the last step before the page is "visible" to the user.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.