I&#039;m pulling information from a database to pull to a datagrid. And after you click the item in the datagrid, it populates on the next page. The item that I&#039;m pulling is a string, but my page will only work if i set it to an integer. Like this:<BR><BR>Public Function TFGetTFuse(ByVal TFUname As Integer)<BR><BR>&#039; Create Instance of Connection and Command Object<BR>Dim myConnection As New SqlConnection(ConfigurationSettings.AppSettings("C onnectionString"))<BR><BR>&#039; Generate Command Object based on Method<BR>Dim myCommand As SqlCommand = SqlCommandGenerator.GenerateCommand(myConnection, _<BR>CType(MethodBase.GetCurrentMethod(), MethodInfo), _<BR>New Object() {TFUname})<BR><BR>&#039; Execute the command<BR>myConnection.Open()<BR>Dim result As SqlDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConne ction)<BR><BR>&#039; Return the datareader=20<BR>Return result<BR><BR>End Function<BR><BR>Then I bring it to the page like this:<BR><BR>Sub BindTFUse()<BR>Dim ds As DataSet = ConvertDataReaderToDataSet(_TollFreeDB.TFGetTFuse( TFUname))<BR><BR>txtTFUse.DataSource = ds<BR>txtTFUse.DataTextField = "TFUname"<BR>txtTFUse.DataValueField = "TFU_Key"<BR>txtTFUse.DataBind()<BR>ds.Dispose()<B R><BR><BR>End Sub<BR><BR>and I bind in the page load. So then to populate i use this:<BR><BR>txtTFUse.SelectedIndex = e.Item.Cells(3).Text()<BR><BR><BR>My problem is that the item that is being populated is from a "sub" table. ex: F = Front end. My value on the main table is "F". and when i try to bring the value through and populate i get this error:<BR><BR>InvalidCastException: Cast from string "F" to type &#039;Integer&#039; is not valid.]<BR><BR><BR>but if i were to set the value of the db connection to string, then it craps out completely. Please help.<BR><BR><BR>my stored procedure: <BR><BR>CREATE PROCEDURE dbo.TFGetTFUse<BR><BR>@TFUname nvarchar(50)<BR><BR>AS <BR><BR>select TFU_Key, TFUname<BR>from [TollFreeData].dbo.TFuseLKU<BR><BR><BR>thank you.<BR><BR>