Click here to Skip to main content
16,016,345 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to add a default button to my page for my textboxes. But when I add the default button the update panel and key press event I added to the textbox is not working.
<form id="form1" runat="server" defaultbutton="button1" >
Posted
Comments
SujayC 20-Jan-15 1:59am    
share syntax for your button please, your question is not clear enough, just a hint make that button with type = "submit" see if that helps.

1 solution

You can write below lines

C#
<contenttemplate>
<asp:panel id="p" runat="server" defaultbutton="button1" xmlns:asp="#unknown">
            //Form here with button1
</asp:panel>
</contenttemplate>
 
Share this answer
 
Comments
Member 11357862 20-Jan-15 3:44am    
I have used the above code but its not working
Member 11357862 20-Jan-15 3:49am    
Let me tell the detail of my program.This page include searching of my product details which are in database. when I type product name on textbox then corresponding details will be displayed in gridview.eg: If I type 'c' then camera,cot etc will come on gridview and I type 'ca' then camera will come on grid view. This is done by keyup function and the gridview is in update panel. So each time the update panel only update.
When I use the default button then the update panel will not work and the all page will update. so how can I solve this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900