faizan ahmad

Usually the things which were not a straight Google

  Home  |   Contact  |   Syndication    |   Login
  17 Posts | 0 Stories | 68 Comments | 0 Trackbacks

News

Archives

Post Categories

.NET

ASP.NET

ASP.NET

Problem: Say you have two Grid View controls on one page, each grid view has a TexBox and a 'search' button above it TextBox1 btnSearch1 TextBox2 btnSearch2 Now if you press 'Enter' key in TextBox1, it will trigger btnSearch1_click event and when you press 'Enter' key in TextBox2, it still triggers btnSearch1_click Solution: Add asp.net Panel tag and set DefaultButton property. <asp:Panel ID="pnlSearch2" runat="server" DefaultButton="btnSearch2"> TextBox2 btnSearch2 </asp:Panel> ......

I had a Repeater control within a div. Now when there were more records than visible within height of DIV a scroll bar appear. But, when user scrolls down, the headings ( within HeaderTemplate) would go up and not be visible. After googling a little, I was able to find the solution on code project: http://www.codeproject.com/... In my case though I had a 'tr' element within 'HeaderTemplate' element ,so I applied it to like: <tr class="ms-formlabel DataGridFixedHeader ......