I'm using Visual Studio and have created a few additional pages starting form the ECommerce Starter Kit. So far, so good. I'm building a catalogue interface and the page that posts the Sub Categories to the database contains the Datagrid with current categories and a Text Box, Drop Down list and a linkbutton.
I've determined that the click event of the Link Button is firing and I'm able to post the CategoryID from the dropdown list to hte database but have determined that the .text data from the tbxSubCat is posting a null, even though I've typed something in. Below is the code:
<code>
HTML Stuff
<TR>
<TD><asp:label id="Label1" runat="server" Font-Names="Bookman Old Style" Font-Size="Larger" Font-Bold="True">New SubCategory Name</asp:label><br>
<p><asp:textbox id="tbxSubCat" runat="server" Width="176px"></asp:textbox></p>
<p><asp:dropdownlist id="ddlmainCatList" runat="server"></asp:dropdownlist>
<p>
<asp:LinkButton id="lnkSubmit" runat="server" OnClick="lnkSubmit_Click">Submit Category</asp:LinkButton></p>
<p>
<asp:Label id="Label3" runat="server">Label</asp:Label></p>
<p> </p>
</TD>
</TR>
</table>
</TD>
Code Behind Stuff:
Private Sub lnkSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkSubmit.Click
Label3.Text = tbxSubCat.Text
Dim productCatalogue As New ASPNET.StarterKit.Commerce.ProductsDB
Dim CategoryID As Integer = ddlmainCatList.SelectedItem.Value
Dim SubCategoryName As TextBox = tbxSubCat
productCatalogue.InsertSubCat(SubCategoryName, CategoryID)
BindData()
End Sub
If you see in the Sub Routine, the Label3.txt is only receiving a Null. Any ideas?
Regards,
Seth
Seth Fuller
[email protected]