I am having a slight bit of trouble getting my output to show up as I would like. Please take a look at this snippet. As always, I have tried to dumb down the example as much as possible, changing variable names what not so this is a basic example that is hopefully easy to read and understand:
<asp:SqlDataSource ID="SqlDataSourceNames" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnectionString %>" EnableViewState="False"
SelectCommand="SELECT DISTINCT table1.ForName, table1.Counts FROM table1 LEFT OUTER JOIN table2 on table1.1 = table2.1 WHERE (table2.3 = @my3) AND (table2.4 = @my4) AND (table2.5 = @my5) AND (table2.6 = @my6)">
<asp:SessionParameter Name="my3" SessionField="Sess3" />
<asp:SessionParameter Name="my4" SessionField="Sess4" />
<asp:SessionParameter Name="my5" SessionField="Sess5" />
<asp:SessionParameter Name="my6" SessionField="Sess6" />
<asp:GridView ID="GridViewMyList" runat="server" BorderStyle="None" BorderWidth="0px" CellSpacing="5" DataSourceID="SqlDataSourceNames" EnableViewState="False" ShowFooter="True">
<asp:TemplateField HeaderText="Count Num:">
<asp:TextBox ID="TextBox0" runat="server" Columns="3" Text='<%# Bind("Counts") %>'></asp:TextBox>
<asp:TemplateField HeaderText="My List of Names:">
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("ForName") %>'></asp:TextBox>
<FooterStyle HorizontalAlign="left" />
<asp:Button ID="ButtonUpdateCounts" runat="server" Text="Update Counts" />
What I intend to end up with is two columns, each with textboxes containing the data from the two fields coming out of the sqldatasource query. There would also be a footer at the bottom with a button to update the counts...
| My List of Names:
What I am ACTUALLY getting is four columns. Two show up the way I want them to in text boxes, but I also get two columns as text only with the names and counts....
| My List of Names:
[__3__] [___Tom___] Tom 3
[__4__] [___John___] John 4
[__2__] [___Steve___] Steve 2
Clearly, some minor detail in how I am setting up the code is going to make the difference for me, but I have not identified what needs to be changed. Any help would be appreciated and expert points are waiting to be awarded.