|
Article relates to
|
RadComboBox for ASP.NET AJAX
(Telerik.Web.UI v2008.1.415)
|
|
Created by
|
Simon, Telerik
|
|
Last modified by
|
Veskoni, Telerik
|
HOW-TO
Maintain the Value of a RadComboBox at the client, so that it can be accessed easier at the server through the Request.Form collection.
DESCRIPTION
RadComboBox for ASP.NET AJAX stores its whole Client State at the client in a hidden field named "RadComboBoxID_ClientState". There, all needed information about the state of the control is stored in a specifically formatted string. Retrieving the Value, for example, of the RadComboBox on the server through the Request.Form collection requires parsing of this string, which in some cases may not be desired - the code is long or the page to which we POST does not know how to parse it.
In such cases, we need to store the Value in a more simple and standard way. Having in mind how ASP.NET stores the Values for the classic web controls, we can do the same thing with RadComboBox. We simply put a hidden field on the page named "RadComboBoxID_Value" and set its value to the Value of the RadComboBox whenever it is changed. This can be done either at the server or at the client. Further, at the server, we can retrieve the Value in the standard way by getting: Request.Form["RadComboBoxID_Value"] in C# and Request.Form("RadComboBoxID_Value") in VB.
Attached is a project illustrating an implementation of the approach.
Please
Sign In
to rate this article.