Last post Dec 03, 2007 06:07 AM by Utes14
Nov 25, 2007 01:50 PM|Utes14|LINK
I've created a new column in the announcement table to add a new paramater "category". Here's my code to do this stuff :
1) Define a new column in Announcements (VARCHAR(50))
2) Changed Page_load in New_List.aspx.cs to pass category parameter in querystring on "Add new article" click :
RemoveBtn.NavigateURL += Request.QueryString[
panel1.Visible = IsAdmin;
But, when I run the website, the category value is never stored in the database.
The insert statement seems not to be executed, the article doesn't appears in the list.
Thanks for your support.
Nov 26, 2007 06:12 AM|MaineOne|LINK
The datasource looks fine, what it looks like is the catagory value is not being passed properly.
What should the catagory value be and where is the value coming from. Is it selecected from a dropdown or text box when the article is created?
Nov 27, 2007 03:58 AM|Utes14|LINK
The category value is coming from the following control. This control is
inherited from asp:button .
Text="Add new Article"
The category can be equal to string like "Seniors", "18years", "13years". For example, the navigateURL could be "News_Edit.aspx?Action=New&category=Seniors"
I modified the Web.sitemap file to add sub menus in the "News" menu. The category parameter is initialised in relation with the sub-menu selection.
Note that I tried to write directly the category value in the NavigateURL as above but the result was not good. The new article is never stored in the DB. I also verified that the URL parameter is well received in the destination
page (News_Edit.aspx.cs, page_load : object o2 = Request.QueryString["Category"];), all is
Thanks to give me some advices to debug this issue. I would really appreciate to go ahead with the club starter kit.
Nov 27, 2007 05:17 AM|MaineOne|LINK
I think you may fin the Rolloverlink may be causing the issue. I would troubleshoot it by.
1. add a Text onto the news_edit page and on page load event put textbox1.text=Category ( this will let you know if the value is making it to the page)
2. If it is getting to the page, the problem may be that the clubrollover button is a call to a seperate sub routine, you may be losing the value between the sub routine and whan the sql command is attempted.
Nov 28, 2007 04:03 PM|Utes14|LINK
I added a label control into the News_Edit.aspx.cs page and on page_load event put "Label2.Text = Request.QueryString[
Thanks for you support.
Dec 03, 2007 06:07 AM|Utes14|LINK
Could someone help me ?
Is there a way to debug the sqlDataSource ? I want to verify if an error message is generated during the insert statement.