0

I have this following code as a Header in MasterPage.Master

<div class="col-3">
    <asp:Panel ID="p_searchAll" runat="server" DefaultButton="b_searchAll">
        <div class="input-group">
           <asp:TextBox runat="server" CssClass="form-control searchAll" ID="searchAll" placeholder="Cari deals, cashback atau merchant" AutoCompleteType="Disabled"></asp:TextBox>
          <div class="input-group-append">
              <asp:LinkButton class="input-group-text btnSearchAll" id="b_searchAll" runat="server">
                 <i class="fa fa-arrow-right"></i>
              </asp:LinkButton>
          </div>
       </div>
    </asp:Panel>
</div>

And the behind code MasterPage.Master.VB:

Public Sub b_searchAll_Click(sender As Object, e As EventArgs) Handles b_searchAll.Click
   Dim key As String = searchAll.Text.Trim
     If (key.Trim <> "") Then
         Response.Redirect("/test?search=" & key)
     End If
   End Sub

When I click b_searchAll Button in first time, I get the correct result in the search Page. But when I write in searchAll textboxt and enter in the second time I get this following error:

enter image description here

This error happen when I getting result from search page and I try to search again from search page.

Anyone can help?

Thanks in Advance

naticap
  • 379
  • 1
  • 5
  • 19
  • It looks like a problem with your post data, can you show us any form elements you have on the page? Also, I recommend URL encoding your "key" variable before adding it to the URL – doom87er Oct 25 '18 at 19:07
  • @doom87er I have just one form in masterpage and I Put Panel in header bar. So it's should looks like this following code: `
    //Search Panel that I mention, in my question post
    //Main Content
    `
    – naticap Oct 26 '18 at 00:25

0 Answers0