ASP Button no more rendered as Submit

4 posts, 0 answers
  1. Manoj
    Manoj avatar
    11 posts
    Member since:
    Jul 2010

    Posted 07 Oct 2010 Link to this post

    Hi,
    We have the following code in the aspx file to enable ajax page post back when clicked on a button or a check box is checked to fetch results for the grid based on the criteria given in the text box.
     

    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxyCustomerPage" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnSearch">
        <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="CustomerGrid" UpdatePanelHeight="" 
            LoadingPanelID="RadAjaxLoadingPanelCustomer" />
        </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="chkIncludeDeprecated">
        <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="CustomerGrid" UpdatePanelHeight="" 
            LoadingPanelID="RadAjaxLoadingPanelCustomer" />
        </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanelCustomer" runat="server"
    Skin="Default" InitialDelayTime="200" MinDisplayTime="300">
    </telerik:RadAjaxLoadingPanel>

    In the above code, after the part

    <telerik:AjaxSetting AjaxControlID="btnSearch">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="CustomerGrid" UpdatePanelHeight="" 
        LoadingPanelID="RadAjaxLoadingPanelCustomer" />
    </UpdatedControls>
    </telerik:AjaxSetting>

    was added, the submit button no longer appears as a submit button (<input type="submit"/>) but a normal button(<input type="button"/>) rendered to the page. As a result after the user enters a text in the search criteria and hits the enter key the page is not submitted, until the user clicks the button.

    Can somone help what could we be missing in the code while we configured ajax action for the button, that it lost the submit behavour.

    Thanks,
    Manoj

  2. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 07 Oct 2010 Link to this post

    Hello Manoj,

    What is with the <BR> tags between every space? Is that how your settings look like?
  3. Manoj
    Manoj avatar
    11 posts
    Member since:
    Jul 2010

    Posted 07 Oct 2010 Link to this post

    Looks like those <BR>s are inserted by the "Format Code Block" option when creating/replying to thread in forum. Please ignore those <BR>s.
  4. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 07 Oct 2010 Link to this post

    OK. Either way, when a button is ajaxified, they set the onclick event of the button so it's called through ajax. So if you want to have that button pressed when enter is pressed in the search criteria, you'll need to something like this:

    <%=btnSearch.ClientID%>.click();

    To raise the click event of the button. You'll also need to handle the key press event of the text box to call that method.

    I hope that helps.
Back to Top