Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
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