This is a migrated thread and some comments may be shown as answers.

ASP Button no more rendered as Submit

3 Answers 54 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Manoj
Top achievements
Rank 1
Manoj asked on 07 Oct 2010, 12:33 PM

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

3 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 07 Oct 2010, 02:33 PM
Hello Manoj,

What is with the <BR> tags between every space? Is that how your settings look like?
0
Manoj
Top achievements
Rank 1
answered on 07 Oct 2010, 02:36 PM
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.
0
Cori
Top achievements
Rank 2
answered on 07 Oct 2010, 06:21 PM

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.
Tags
Ajax
Asked by
Manoj
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Manoj
Top achievements
Rank 1
Share this question
or