This is a migrated thread and some comments may be shown as answers.

Populate RadToolBarDropDown Text

1 Answer 61 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 10 Feb 2012, 09:36 PM
I'm working with the RadToolBarDropDown control, and the goal is to populate the text of the RadToolBarDropDown dynamically in C#;

The RadToolBarDropDown is encapsulated in a RadToolBar;

Is it best to place the below code in a "if (!IsPostBack)" section : 

RadToolBarDropDown rbViewReport = (RadToolBarDropDown)RadToolBar4.FindItemByText("Please Select");
rbViewReport.Text = RetrievedValueConfirm;
 

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 13 Feb 2012, 06:53 AM
Hello,

Best approach is using "if (!IsPostBack)" in page load. The main advantage of this is it gets a value indicating whether the page is being loaded in response to a client postback, or if it is being loaded and accessed for the first time. Otherwise it will execute the same code in every postback.

Thanks,
Princy.
Tags
ToolBar
Asked by
Robert
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or