Hello everyone
I am trying to create dynamic RadComboBox in my Ajax request, and then sending back as html, for this i am using RenderControl for the RadComboBox control. but I get this error when it executes the RenderControl method ...
new ajax_error('System.InvalidOperationException','Page cannot be null. Please
ensure that this operation is being performed in the context of an ASP.NET request.',0)
Here is the code snippet
Dim sb As New StringBuilder |
Dim sw As New System.IO.StringWriter(sb) |
Dim hw As New HtmlTextWriter(sw) |
Dim ddlCountries As New Telerik.Web.UI.RadComboBox |
ddlCountries.ID = "ddlCountries" |
Dim loc As New Frokht.Location |
Dim dr As Data.SqlClient.SqlDataReader |
dr = loc.GetAllCountries() |
ddlCountries.DataSource = dr |
ddlCountries.DataTextField = "Name" |
ddlCountries.DataValueField = "Code" |
ddlCountries.DataBind() ddlCountries.RenderControl(hw) |
Please help
Thanks in advance