I'm trying to set a radTextBox's text to the value of cookie... but I keep getting an error that Object is not set to reference of an object.
Little help!
Little help!
| using System; |
| using System.Data; |
| using System.Configuration; |
| using System.Collections; |
| using System.Web; |
| using System.Web.Security; |
| using System.Web.UI; |
| using System.Web.UI.WebControls; |
| using System.Web.UI.WebControls.WebParts; |
| using System.Web.UI.HtmlControls; |
| using System.IO; |
| using System.Collections.Specialized; |
| using System.Drawing; |
| using Telerik.WebControls; |
| public partial class UserArticleDetails : System.Web.UI.Page |
| { |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| } |
| protected void FormView1_PreRender1(object sender, EventArgs e) |
| { |
| if (this.FormView1.CurrentMode == FormViewMode.Insert) |
| { |
| //This works |
| TextBox txtName1 = this.FormView1.FindControl("txtName") as TextBox; |
| txtName1.Text = "test"; |
| //This does not work |
| TextBox radName = this.FormView1.FindControl("radTextBox1") as TextBox; |
| radName.Text = "hello"; |
| } |
| } |