title: How to set up ASP.NET SQL Datasource to accept TVP
body: <p>In the codebehind you would add the TVP as a SqlDbType.Structured for a stored procedure
  But this doesn't exist in an ASP.NET SqlDataSource control.</p>
  
  <p>I have stored my Datatables in session variables (don't worry they are small!) and I need to pass those as parameters to the SqlDataSource (which has a number of databound objects)</p>
  
  <p>I pointed the Datasource to the session variable but it fails on the conversion to the table type.</p>
  
  <p>EDIT:
  Let's say I take the Session variable out of the equation (because, really, it's completely tangential)</p>
  
  <p>There must be a way I can attach a DBType.Structured to a SQLDataSource.
  My Listviews are appropriately databound but the store procedures to which they are attached must take TVP's</p>
  
  <p>I cannot believe that there would be no way to send a TVP paramater for a SQLDataSource?
  What are my alternatives?</p>
  
  <p>EDIT2:
  I've been looking into creating a custom parameter for the SqlDataSource but it still seems to me like its "eval" method won't be happy with the structured data type</p>
  
  <p>EDIT3:
  It's beginning to appear that my only option is to do all the work in codebehind for my databound controls. I added a bounty in case anybody else has an elegant solution.</p>
  
  <p>EDIT4:
  Is there, perhaps, a way that I can pass the table as an object to a stored procedure, then have SQL Server convert it to the TVP?</p>