Hi Nimesh, Thank you very much for you help but i am still geting two errors.
Error 1 Overload resolution failed because no accessible 'New' can be called without a narrowing conversion:
'Public Sub New(g As String)': Argument matching parameter 'g' narrows from 'Object' to 'String'. Line 5 38 C:\...\my-io.com\
Error 2 Value of type 'System.Guid' cannot be converted to 'String'. Line 7 72 C:\...\my-io.com\
When i run the web page and login i get the following Compiler Error:
Compiler Error Message: BC30519: Overload resolution failed because no
accessible 'New' can be called without a narrowing conversion:
The code for the aspx.vb file:
1 Partial Class MyAccount_myProfile
2 Inherits System.Web.UI.Page
3 Protected Sub SqlDSmyProducts_Selecting1(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles SqlDSmyProducts.Selecting
4
5 Dim guidStringUser As Guid = New Guid(Membership.GetUser.ProviderUserKey)
6
7 SqlDSmyProducts.SelectParameters.Item("UserID").DefaultValue = guidStringUser
8
9 GridView1.DataBind()
10
11 End Sub
The SqlDataSource code:
<asp:SqlDataSource ID="SqlDSmyProducts" runat="server" OnSelecting="SqlDSmyProducts_Selecting1" ConnectionString="<%$ ConnectionStrings:myioDBConString %>"
SelectCommand="SELECT DISTINCT Products.Name, UsersProducts.SerialNo, UsersProducts.VersionNo, UsersProducts.PurchasedDate, UsersProducts.PurchasedFrom, UsersProducts.Other, UsersProducts.VehicleMake, UsersProducts.VehicleModel, UsersProducts.VehicleYear, UsersProducts.DateAdded FROM UsersProducts INNER JOIN Products ON UsersProducts.ProductId = Products.ProductId WHERE (UserProducts.UserID = @UserID) ORDER BY UsersProducts.DateAdded DESC">
<SelectParameters>
<asp:Parameter Name="UserID" Type="String" />
</SelectParameters>
</asp:SqlDataSource> Sorry for this but your help will be greatky appreciated.
Many Thanks
Younger