title: Using parameters in a code behind vb.net file on a DataSource to prevent injection attacks
body: <p>We would like to change the following coding so it will use parameters to prevent injection attacks.</p>
  
  <p>Here is the code in the Public Class area:</p>
  
  <pre><code>Public Class Parents1
  Inherits System.Web.UI.Page
  
  Dim theTableAdapter As New DataSetParentsSummaryTableAdapters.ParentsSummaryTableAdapter
  </code></pre>
  
  <p>Here is what we have in the page_load:</p>
  
  <pre><code>Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
  
      GridViewParentsSummary.DataSource = theTableAdapter.GetData("ALL")
  End Sub
  </code></pre>
  
  <p>Here is the code used to load a GridView with data from a Search button click:</p>
  
  <pre><code>Protected Sub ButtonSearch_Click(sender As Object, e As EventArgs) Handles ButtonSearch.Click
  
      GridViewParentsSummary.DataSource = theTableAdapter.GetData(TextBoxSearch.Text)
  End Sub
  </code></pre>
  
  <p>Can you show the needed code required to use parameters?</p>