Well, I would start by making the textbox markup correctly.
You've got:
<asp:TextBox ID="ClaimInfo" runat="server" </asp:TextBox>
<asp:TextBox ID="PIC" runat="server" </asp:TextBox>
And you should have:
<asp:TextBox ID="ClaimInfo" runat="server"></asp:TextBox>
<asp:TextBox ID="PIC" runat="server"></asp:TextBox>
And then I'd add some code that gets the data from your DataSet and puts it
into your Textboxes. All you've got is code that goes to the database and
populates a DataSet - - it doesn't attempt to use that data.
-Scott
"JJ297" <> wrote in message
news:45623c9c-4d01-4244-8c35-...
> I'm unable to get any data to come up/appear in my text boxes...what
> am I doing wrong?
>
> I have two textboxes on Default.aspx
>
> <asp:TextBox ID="ClaimInfo" runat="server" </asp:TextBox>
>
> <asp:TextBox ID="PIC" runat="server" </asp:TextBox>
>
>
> I'm bringing the values over in a querystring and wrote a stored
> procedure to select * from the table.
>
> ALTER procedure [dbo].[GetClaiminfo]
>
> @Claiminfo char(6),
> @PIC char(2)
>
> As
>
>
> SELECT *
> FROM DelayedClaim
> WHERE claiminfo = @claiminfo and pic = @pic
>
> When the page loads I want these two text boxes to populate from info
> from the database:
>
> <asp:TextBox ID="LAF" runat="server" </asp:TextBox>
>
> <asp:TextBox ID="Docpmtt" runat="server" </asp:TextBox>
>
>
> Here's the page load info but nothing appears in the textboxes:
>
> Dim conn As New
> Data.SqlClient.SqlConnection(ConfigurationManager. ConnectionStrings("ConnectionString").ConnectionSt ring)
> Dim cmd As New Data.SqlClient.SqlCommand
> With cmd
> .CommandType = Data.CommandType.StoredProcedure
> .CommandText = "GetClaimInfo"
> cmd.Parameters.AddWithValue("@claiminfo",
> Integer.Parse(Request.QueryString("claiminfo")))
> cmd.Parameters.AddWithValue("@pic",
> (Request.QueryString("pic")))
> .Connection = conn
> End With
> Dim adapter As New Data.SqlClient.SqlDataAdapter(cmd)
>
> Try
> conn.Open()
> Dim ds As New Data.DataSet
> adapter.Fill(ds)
>
>
> Finally
> conn.Close()
> End Try
>
> What am I missing? Thanks!
|