Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Oct 21, 2009 01:33 AM by cramerhwood
May 12, 2006 03:09 PM|LINK
Remember me next time
Isn't this something of a bug?
Doesn't seem to remember much.
Jun 15, 2006 08:15 PM|LINK
In the C# version of the Club Site when a user clicks "Add Event" will be directed to the add event page. If the user does not enter a description for the event, there's no validation for that field and it throws an error reporting
a invalid conversion attempt from a DBNull. I haven't found a permanent fix for this because I'm not familiar with the "FormView" control that contains it. A quick fix was that on page load, if the user is adding a new event, I set the text property of the
description text boxt to " " so that it is not null. If anyone knows a permafix for this, let me know.
Jun 19, 2006 06:58 PM|LINK
I have implemented RequiredFieldValidator fields for all the things that I think are necessay in the database. You can also check each table via the Server Explorer so you know which fields are not allowed to be Null/Nothing.
Jun 21, 2006 12:54 AM|LINK
If you delete a location, and an event exists that uses that location, you cannot then edit the event.
Quick, dirty fix, in locations_edit.aspx, find the delete command in the datasource and change it from
Jun 26, 2006 12:03 AM|LINK
I found a bug in the events_list.aspx page.
I apologize if this bug has already been covered. I looked through the posts and could not find any threads about it so I decided to post what I discovered. Hope this helps.
1. log in as admin
2. navigate to events_list
3. click "List View"
4. click the green rollover button "Remove"
5. you are redirected to Events_Edit.aspx
6. The event is not removed.
Under Begin News Item comment, under <asp:repeater...>, within <ItemTemplate>, and within <asp:panel ID=panel2...>, the line
"<Club:RolloverLink ID="RemoveBtn" runat="server" Text="Remove" NavigateURL='<%# "Events_Edit.aspx?Action=Remove&id=" & cstr(Eval("id")) %>'/>"
should be changed to read
<Club:RolloverLink ID="RemoveBtn" runat="server" Text="Remove" NavigateURL='<%# "Events_Edit.aspx?Action=delete&id=" & cstr(Eval("id")) %>'/>
This fix passes the correct parameter value to "action" that is defined in the events_edit.aspx. Until this fix, the logic in the events_edit.aspx page would fall through to the "Case Else" and land you at the event_edit instead of "removing" the event
and redirecting you back to events_list.aspx.
Below is the sub that the "action" value is passed to:
If Not IsPostBack Then
'Initialize the fields
Dim action As Object = Request.QueryString("Action")
If Not action Is Nothing Then
Select Case LCase(CStr(action))
'We are in new mode
Dim lp As LocationsPicker = CType(FormView1.FindControl("LocationPicker1"), LocationsPicker)
lp.LocationID = Nothing
Dim dp As DurationPicker = CType(FormView1.FindControl("dtpicker"), DurationPicker)
dp.startDateTime = Now
dp.endDateTime = Now.AddHours(3)
Dim slp As TextBox = CType(FormView1.FindControl("staticURLTextBox"), TextBox)
slp.Enabled = False
SqlDataSource1.Delete() /* This was origionally "Remove" and I changed to "Delete"
'We are in edit mode
Dim cb As CheckBox = CType(FormView1.FindControl("CheckBox1"), CheckBox)
Dim surl As TextBox = CType(FormView1.FindControl("staticURLTextBox"), TextBox)
If Not surl.Text Is Nothing AndAlso surl.Text <> "" Then
cb.Checked = True
surl.Enabled = True
surl.Enabled = False
Jul 02, 2006 03:32 PM|LINK
This is copied from an old post:
I believe this is not solved yet:
I have the site up-and running, but when I try to add a News entry, and select a future date for the control that says ' The news article will not be visible to users until after this date.', this date doesn't
seem to be respected. If I add a news article to be displayed in the future, it still shows ALL the entries from both the home page as well as the news link.
Anyone else have this problem?
Jul 02, 2006 10:17 PM|LINK
Another Club Kit surprise.
In this case, it's the select statement in the sqldatasource on default.aspx, and the stored procedure PagedAnnouncementList, neither one does what the UI suggests it will do.
To fix, in both places, add 'itemdate <= getdate()' to the where clause, i.e.:
SELECT top 5 [id], [itemdate], [title], [description], [photo] FROM [Announcements]
WHERE itemdate <= GETDATE() ORDER BY itemdate DESC
Jul 03, 2006 12:56 PM|LINK
Once again I thank you.
Man you are invaluable for this Forum.
Jul 12, 2006 03:07 PM|LINK
Would this be the correct syntax on the stored procedure?
(itemdate = @keydate)
Jul 12, 2006 05:29 PM|LINK
There was some other problem with that sproc, I forget what exactly, so I had written a slightly different version of it:
ALTER PROCEDURE [dbo].[PagedAnnouncementList]
@pageNum INT = 1,
@PageSize INT = 10
-- Set the page bounds
DECLARE @PageLowerBound int
DECLARE @PageUpperBound int
DECLARE @TotalRecords float
SET @PageLowerBound = @PageSize * (@pageNum - 1)
SET @PageUpperBound = @PageSize - 1 + @PageLowerBound
-- Create a temp table to put items in the order we want
CREATE TABLE #ItemIndex
IndexId int IDENTITY (0, 1) NOT NULL,
-- Insert into temp table
INSERT INTO #ItemIndex (NewsId)
FROM announcements a WHERE itemdate <= GETDATE() ORDER BY itemdate DESC, id DESC
-- Get the page we need from the ordered temp table
SELECT a.id, a.itemdate, a.title, a.description, a.photo FROM Announcements a
JOIN #ItemIndex i ON i.NewsId = a.id
WHERE i.IndexId >= @PageLowerBound AND i.IndexId <= @PageUpperBound
ORDER BY itemdate DESC, id DESC
-- Return the number of pages
SELECT @TotalRecords = COUNT(*)