Finding control on aspx

Total Post:183


 1317  View(s)
Rate this:

I have a aspx page which has a few radcomboboxes; radTerm and radOldYear.

aspx also has a radgrid which is updatable by a WebUserControl ascx. This Web user control has a few radcomboboxes, radName and radNewyr.

In the .ascx.cs, i want to be able to find the comoboxes which are on the promote.aspx. Tried using:

RadComboBox tl = (RadComboBox)this.Page.FindControl("radTerm");

Someone please help me find the controls on the main page. i am calling them through the webuser control that i load in the radgrid.

  1. Re: Finding control on aspx

    Hi Ankita, 

    First, you have to find the promote.ascx control on the page, so:

    Control promote = (Control)this.Page.FindControl("WhateverYouCalledPromote");

    Now that you have found the control, you can search for the control that you want:

    RadComboBox tl = (RadComboBox)promote.FindControl("radTerm");


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.