I have a grid where you can select items, a drop down and a button. You can select an action from the dropdown and the click the button to open the modal dialog. I need to put the id of the selected items in the Session first (IMPORTANT!), and then I need to open a Modal Dialog from code behind. I have tried a few solutions but the client code always get executed before the server code. Thanks in advance, UPDATE This is the code in the aspx page <telerik:RadComboBox ID="rcActions" runat="server" DataTextField="Key" DataValueField="Value"> </telerik:RadComboBox> <asp:Button ID="btnGo" runat="server" Text="GO" OnClick="btnGo_OnClick" /> <telerik:RadGrid ID="radGrid1" runat="server" AutoGenerateColumns="false" AllowPaging="true" OnNeedDataSource="radGrid1_OnNeedDataSource" OnItemCommand="radGrid1_ItemCommand" OnColumnCreated="radGrid1_OnColumnCreated" OnItemDataBound="radGrid1_OnItemDataBound"> <MasterTableView AutoGenerateColumns="false" NoMasterRecordsText="<%$Resources:GlobalResource, noRecords%>"> <Columns> <telerik:GridBoundColumn DataField="Id" UniqueName="Id" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="UnitNumber" UniqueName="UnitNumber" Visible="false"> </telerik:GridBoundColumn> <telerik:GridClientSelectColumn UniqueName="Selected"> </telerik:GridClientSelectColumn> </Columns> <NestedViewSettings> <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="Id" MasterKeyField="Id" /> </ParentTableRelation> </NestedViewSettings> <NestedViewTemplate> <asp:Panel runat="server" Visible="false" ID="InnerContainer"> <!-- Some code --> </asp:Panel> </NestedViewTemplate> </MasterTableView> </telerik:RadGrid>