title: Adding parameter to sqldatasource, How should i pass them to execute my stored procedure in asp.net
body: <p>I am using a gridview where i am calling a stored procedure which has 4 input parameters. </p>
  
  <p>Out of these 4 parameters, values are to be given such that</p>
  
  <p><strong>DomainId</strong> = This has to be the row which is to be deleted. This is a primary key</p>
  
  <p><strong>Domain</strong>   = This field has to be passed to SP as NULL.</p>
  
  <p><strong>Description</strong>= This field has to be passed as NULL.</p>
  
  <p><strong>OperationType</strong>= This field has to be passed by programmer as some static value say 4</p>
  
  <p>How to i need to specify these here...</p>
  
  <blockquote>
    <p>More details of the Question are
    <a href="https://stackoverflow.com/questions/2363973/how-to-delete-data-from-gridview-which-is-using-datasource-and-sp-using-wizard"><strong>here</strong></a>.</p>
  </blockquote>
  
  <p>Please help me out.</p>
  
  <pre><code>&lt;DeleteParameters&gt;
                          &lt;asp:ControlParameter ControlID="GridView1" Name="DomainId" 
                              PropertyName="SelectedValue" Size="4" Type="Int32" /&gt;  
                          &lt;asp:Parameter DefaultValue="" Name="Domain"  Size="16" Type="String" /&gt;
                          &lt;asp:Parameter DefaultValue="" Name="Description" Type="String" /&gt;
                          &lt;asp:Parameter DefaultValue="4" Name="OperationType" Type="Byte" /&gt;
                      &lt;/DeleteParameters&gt;
  </code></pre>
  
  <p>On running my code using this </p>
  
  <p>I gets an <strong>error</strong></p>
  
  <blockquote>
    <p>Procedure or Function
    'spOnlineTest_Domain' expects
    parameter '@Domain', which was not
    supplied</p>
  </blockquote>