I have a SqlDataSource that may or may not have a QueryStringParameter present (depending on where the request is coming from).
I am trying to use the following statement but get the error” Object reference not set to an instance of an object”. After using the debugger, I know “QueryPictureID” has a value so I am guessing I have not set the ‘type’ correctly.
Any help would be appreciated.
Thanks
John
Note: The 'lblQueryString.text' is just to help me debug.
Protected Sub SqlDataSource_GetNews_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles SqlDataSource_GetNews.Selecting
If Request.Params("PictureID") Is Nothing Then
lblQueryString.Text = "Query string not Present"
Else
Dim QueryPictureID As String
QueryPictureID = Request.Params("Pictur ...
Go to the complete details ...