Hi all. I've made a module to display certain blog entries on my website depending on an option selected in the edit content section. The problem is that the module only displays one category of entries, and the input (a boolean variable) does not seem to reach my sqldataprovider.vb file. Here is the code in my cmdUpdate_Click function:
objNewsandEventsSideBar.IsNews = Convert.ToBoolean(RadioButtonList1.SelectedItem.Value)
Where the value of one radio button is "True" and the other "False".
Here is the code from my sqldataprovider.vb file:
Public Overrides Function GetNewsorEventsLatest(ByVal IsNews As Boolean) As System.Data.IDataReader
If IsNews = True Then
Return CType(SqlHelper.ExecuteReader(ConnectionString, "dbo.NewsArticlesSelectLatest"), IDataReader)
ElseIf IsNews = False Then
Return CType(SqlHelper.ExecuteReader(ConnectionString, "dbo.EventsArticlesSelectLatest"), IDataReader)
End If
End Function
If I manually change the value of IsNews within this function, then the module will display news items (it usually only displays events items).
I guess what I really want to know is where the functions from within sqldataprovider.vb are called from, and how that is linked to the Edit<modulename>.ascx file.
I really hope this makes sense!