Part of the sqldatasource parameters:
<asp:SqlDataSource ID="AllQuestionAskedDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:CP_AllQuestionsAnswered %>" SelectCommand="SELECT ThreadTitle
FROM Threads
WHERE UsersID=@UserID">
<SelectParameters>
<asp:Parameter Name="UserID" />
</SelectParameters>
</asp:SqlDataSource>
The code behind:
Guid userid = UsefulStaticMethods.GetUserNameFromUserGuid(name);
AllQuestionAskedDataSource.SelectParameters["UserID"].DefaultValue = userid;
It tells me that it cant convert userid from Guid to string. But the parameter must be a Guid for the select statement of the sqldatasource to work
Updated Code