This is a migrated thread and some comments may be shown as answers.
RadTextBox text value is always empty string
1 Answer 91 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
William asked on 12 Sep 2011, 05:26 AM
1 - Version 2011.2.712.40 of Telerik.Web.UI.
2 - Net 4.0 (therefore Visual Studio 2010).
3 - Development machine is Windows 7 Ultimate.
4 - Application pool is .Net 4.0 Integrated.

I have a simple login form (that uses a master page) with RadTextBoxes for username/password and a server-side button:

<%@ master autoeventwireup="true" codebehind="content.master.cs" inherits="Administration.content" language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
          <form id="frmFormCriteria" runat="server">
               <asp:contentplaceholder id="cphContent" runat="server" />

<%@ page autoeventwireup="true" codebehind="login.aspx.cs" inherits="Administration.login" language="C#" masterpagefile="~/content.master" title="" %>
<%@ mastertype virtualpath="~/content.master" %>
<%@ register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<asp:content contentplaceholderid="cphContent" runat="server">
     <telerik:radscriptmanager runat="server" />
     Username: <telerik:radtextbox emptymessage="[Please enter your username]" id="txtUsername" maxlength="255" textmode="SingleLine" width="200" runat="server" />
     Password: <asp:textbox id="txtPassword" maxlength="100" textmode="password" width="200" runat="server" />
     <asp:button id="btnSubmit" text="Login" runat="server" onclick="btnSubmit_Click" />

When I click inside the username control, the empty message does not disappear.

While debugging, when I type enter the username and password then click the login button, the text value for both controls is an empty string.

If I change the RadTextBoxes to server-side TextBoxes the entered values are passed correctly.

What is even more frustrating, if I change the RadScriptManager to the asp:ScriptManager and leave the RadTextBoxes alone, EVERYTHING (including the empty message disappearing on focus) works correctly.

I must be doing something wrong, but what?!?

The web.config is also:

<?xml version="1.0"?>
        <compilation debug="true" targetFramework="4.0" />
        <customErrors mode="Off" />
        <xhtmlConformance mode="Transitional" />
            <add verb="*" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false" />
                <jsonSerialization maxJsonLength="5000000"/>
        <validation validateIntegratedModeConfiguration="false"/>
            <add verb="*" name="Telerik.Web.UI.WebResource.axd_*" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode"/>

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 15 Sep 2011, 08:19 AM
Hi William,

In scenarios with master pages, the RadScriptManager should be placed on top of the master page and not in the content ones. So, try moving it to the master and let us know if this changes the textboxes' behavior.

All the best,
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question